Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
No longer need to catch the OSError, as we use a HTTP URL instead of …
Browse files Browse the repository at this point in the history
…a local file url in the tests
  • Loading branch information
janjaapdriessen committed Oct 27, 2010
1 parent 27a96fc commit 9eec587
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/grokui/admin/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,13 @@ def fetchMessage(self):
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()
Expand Down

0 comments on commit 9eec587

Please sign in to comment.