[wwwsearch-commits] r36445 - wwwsearch/mechanize/trunk/mechanize
jjlee at codespeak.net
jjlee at codespeak.net
Wed Jan 10 23:44:28 CET 2007
Author: jjlee
Date: Wed Jan 10 23:44:27 2007
New Revision: 36445
Modified:
wwwsearch/mechanize/trunk/mechanize/_response.py
Log:
Fix MRO error caused by double-wrapping of error response (I think the actual exception only showed up with Python 2.5, but the underlying problem was there since this bit of code was added)
Modified: wwwsearch/mechanize/trunk/mechanize/_response.py
==============================================================================
--- wwwsearch/mechanize/trunk/mechanize/_response.py (original)
+++ wwwsearch/mechanize/trunk/mechanize/_response.py Wed Jan 10 23:44:27 2007
@@ -413,7 +413,8 @@
Accepts responses from both mechanize and urllib2 handlers.
"""
- if isinstance(response, urllib2.HTTPError):
+ if (isinstance(response, urllib2.HTTPError) and
+ not isinstance(response, response_seek_wrapper)):
class httperror_seek_wrapper(response_seek_wrapper, response.__class__):
# this only derives from HTTPError in order to be a subclass --
# the HTTPError behaviour comes from delegation
More information about the wwwsearch-commits
mailing list