From 3c00628b2dcf24cabfcfb477871fb8cf1623d702 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sun, 12 Feb 2017 10:04:21 +0100 Subject: [PATCH] some edits for code quallity --- boswatch.py | 1 - includes/decoders/poc.py | 6 +++--- plugins/eMail/eMail.py | 2 +- plugins/httpRequest/httpRequest.py | 3 ++- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/boswatch.py b/boswatch.py index 5dfba99..f25c50e 100755 --- a/boswatch.py +++ b/boswatch.py @@ -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 diff --git a/includes/decoders/poc.py b/includes/decoders/poc.py index 27c3958..0e6b47b 100644 --- a/includes/decoders/poc.py +++ b/includes/decoders/poc.py @@ -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 diff --git a/plugins/eMail/eMail.py b/plugins/eMail/eMail.py index b639f3c..d054c85 100644 --- a/plugins/eMail/eMail.py +++ b/plugins/eMail/eMail.py @@ -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 diff --git a/plugins/httpRequest/httpRequest.py b/plugins/httpRequest/httpRequest.py index 81b9ba5..3d8d90e 100644 --- a/plugins/httpRequest/httpRequest.py +++ b/plugins/httpRequest/httpRequest.py @@ -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: