mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-26 01:44:20 +01:00
some edits for code quallity
This commit is contained in:
parent
1c56509e25
commit
3c00628b2d
|
|
@ -26,7 +26,6 @@ import subprocess # for starting rtl_fm and multimon-ng
|
|||
|
||||
from includes import globalVars # Global variables
|
||||
from includes import MyTimedRotatingFileHandler # extension of TimedRotatingFileHandler
|
||||
from includes import signalHandler # TERM-Handler for use script as a daemon
|
||||
from includes import checkSubprocesses # check startup of the subprocesses
|
||||
from includes.helper import configHandler
|
||||
from includes.helper import freqConverter
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ def isAllowed(poc_id):
|
|||
@return: Checks both allow/deny-rule and filter-range (suitable for signal-RIC)
|
||||
@exception: none
|
||||
"""
|
||||
|
||||
|
||||
allowed = 0
|
||||
|
||||
|
||||
# 1.) If allowed RICs is set, only they will path,
|
||||
# If RIC is the right one return True, else False
|
||||
if globalVars.config.get("POC", "allow_ric"):
|
||||
|
|
@ -62,7 +62,7 @@ def isAllowed(poc_id):
|
|||
return True
|
||||
else:
|
||||
allowed = 0
|
||||
|
||||
|
||||
if allowed == 0:
|
||||
return False
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ from email.utils import make_msgid # need for confirm to RFC2822 standard
|
|||
|
||||
from includes import globalVars # Global variables
|
||||
|
||||
from includes.helper import timeHandler # helper function
|
||||
#from includes.helper import timeHandler # helper function
|
||||
from includes.helper import configHandler # helper function
|
||||
from includes.helper import wildcardHandler # helper function
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ def run(typ,freq,data):
|
|||
logging.debug("send %s HTTP request", typ)
|
||||
|
||||
try:
|
||||
resp = urllib2.urlopen(url)
|
||||
#resp = urllib2.urlopen(url)
|
||||
urllib2.urlopen(url)
|
||||
except urllib2.HTTPError as e:
|
||||
logging.warning("HTTP response: %s", e.code)
|
||||
except urllib2.URLError as e:
|
||||
|
|
|
|||
Loading…
Reference in a new issue