[Checkins] SVN: grokui.admin/trunk/src/grokui/admin/security.py No longer need to catch the OSError, as we use a HTTP URL instead of a local file url in the tests
Jan-Jaap Driessen
jdriessen at thehealthagency.com
Wed Oct 27 06:14:17 EDT 2010
Log message for revision 117952:
No longer need to catch the OSError, as we use a HTTP URL instead of a local file url in the tests
Changed:
U grokui.admin/trunk/src/grokui/admin/security.py
-=-
Modified: grokui.admin/trunk/src/grokui/admin/security.py
===================================================================
--- grokui.admin/trunk/src/grokui/admin/security.py 2010-10-27 10:12:34 UTC (rev 117951)
+++ grokui.admin/trunk/src/grokui/admin/security.py 2010-10-27 10:14:17 UTC (rev 117952)
@@ -115,14 +115,13 @@
message = opener.open(req).read()
self._message = cgi.escape(message)
self._warningstate = True
- except (urllib2.HTTPError, OSError), e:
- if (getattr(e, 'code', None) == 404) or (
- getattr(e, 'errno', None) == 2):
+ except urllib2.HTTPError, e:
+ if e.code == 404:
# No security warning found, good message.
self._message = u''
self._warningstate = False
- except Exception, e:
- pass
+ else:
+ raise
if self._message == MSG_DISABLED:
self._message = u''
self.last_lookup = time.time()
More information about the checkins
mailing list