Commit d5aaf706 by Łukasz Nowak Committed by Łukasz Nowak

monitor: Catch timeout rise by ssl.SSLError

Additionally print exact exception message.

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