0001-environment-ignore-SSLError-timeout-in-check_operati.patch
hobo/environment/models.py | ||
---|---|---|
1 | 1 |
import datetime |
2 | 2 |
import urllib2 |
3 | 3 |
import json |
4 |
import ssl |
|
4 | 5 | |
5 | 6 |
from django.conf import settings |
6 | 7 |
from django.db import models |
... | ... | |
79 | 80 |
fd = urllib2.urlopen(zone.href, timeout=10) |
80 | 81 |
fd.close() |
81 | 82 |
self.last_operational_success_timestamp = once_now |
82 |
except (urllib2.URLError, urllib2.HTTPError), e: |
|
83 |
except (urllib2.URLError, urllib2.HTTPError, ssl.SSLError), e:
|
|
83 | 84 |
pass |
84 | 85 |
self.save(update_fields=('last_operational_check_timestamp', 'last_operational_success_timestamp')) |
85 | 86 | |
86 |
- |