Skip to content

Commit

Permalink
backport testbrowser bug fix (from revision 66048)
Browse files Browse the repository at this point in the history
  • Loading branch information
benji-york committed Mar 15, 2006
1 parent 5b9d976 commit b6934a1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion browser.py
Expand Up @@ -207,7 +207,15 @@ def set(self, value):
def open(self, url, data=None):
"""See zope.testbrowser.interfaces.IBrowser"""
self._start_timer()
self.mech_browser.open(url, data)
try:
self.mech_browser.open(url, data)
except urllib2.HTTPError, e:
if e.code >= 200 and e.code <= 299:
# 200s aren't really errors
pass
else:
raise

self._stop_timer()
self._changed()

Expand Down

0 comments on commit b6934a1

Please sign in to comment.