Commit d5aaf706 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Łukasz Nowak

monitor: Catch timeout rise by ssl.SSLError

Additionally print exact exception message.

/reviewed-on !56
parent 76b353fa
...@@ -217,8 +217,8 @@ class Monitoring(object): ...@@ -217,8 +217,8 @@ class Monitoring(object):
response = urllib2.urlopen(url, timeout=timeout) response = urllib2.urlopen(url, timeout=timeout)
except urllib2.HTTPError: except urllib2.HTTPError:
print "ERROR: Failed to get Monitor configuration file at %s " % url print "ERROR: Failed to get Monitor configuration file at %s " % url
except socket.timeout, e: except (socket.timeout, ssl.SSLError) as e:
print "ERROR: Timeout while downloading monitor config at %s " % url print "ERROR: Timeout with %r while downloading monitor config at %s " % (e, url)
else: else:
try: try:
monitor_dict = json.loads(response.read()) monitor_dict = json.loads(response.read())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment