mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-05 00:00:03 +01:00
added error logging for http plugin
This commit is contained in:
parent
6da22e331a
commit
06c5846709
|
|
@ -94,7 +94,13 @@ def run(typ,freq,data):
|
|||
# HTTP-Request
|
||||
#
|
||||
logging.debug("send %s HTTP request", typ)
|
||||
urllib2.urlopen(url)
|
||||
|
||||
try:
|
||||
resp = urllib2.urlopen(url)
|
||||
except urllib2.HTTPError as e:
|
||||
logging.error("HTTP response: %s", e.code)
|
||||
except urllib2.URLError as e:
|
||||
logging.error("HTTP-specific error: %s", e.args)
|
||||
|
||||
|
||||
except:
|
||||
|
|
|
|||
Loading…
Reference in a new issue