0001-use-first-zone-URL-when-checking-for-operationality-.patch
hobo/environment/models.py | ||
---|---|---|
65 | 65 |
once_now = now() |
66 | 66 |
self.last_operational_check_timestamp = once_now |
67 | 67 |
try: |
68 |
fd = urllib2.urlopen(self.base_url, timeout=10) |
|
68 |
zone = self.get_admin_zones()[0] |
|
69 |
fd = urllib2.urlopen(zone.href, timeout=10) |
|
69 | 70 |
fd.close() |
70 | 71 |
self.last_operational_success_timestamp = once_now |
71 |
except (urllib2.URLError, urllib2.HTTPError): |
|
72 |
except (urllib2.URLError, urllib2.HTTPError), e:
|
|
72 | 73 |
pass |
73 | 74 |
self.save(update_fields=('last_operational_check_timestamp', 'last_operational_success_timestamp')) |
74 | 75 | |
75 |
- |