From 40f648ec945b79e71016d44c8a466899d0e0c054 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Jaillet Date: Thu, 23 Mar 2017 14:13:07 +0100 Subject: [PATCH] environment: ignore SSLError timeout in check_operational (#15572) --- hobo/environment/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hobo/environment/models.py b/hobo/environment/models.py index 2b65e3b..d2de174 100644 --- a/hobo/environment/models.py +++ b/hobo/environment/models.py @@ -1,6 +1,7 @@ import datetime import urllib2 import json +import ssl from django.conf import settings from django.db import models @@ -79,7 +80,7 @@ class ServiceBase(models.Model): fd = urllib2.urlopen(zone.href, timeout=10) fd.close() self.last_operational_success_timestamp = once_now - except (urllib2.URLError, urllib2.HTTPError), e: + except (urllib2.URLError, urllib2.HTTPError, ssl.SSLError), e: pass self.save(update_fields=('last_operational_check_timestamp', 'last_operational_success_timestamp')) -- 2.11.0