[Zope3-checkins] SVN: Zope3/trunk/src/mechanize/_mechanize.py fix mechanize bug that caused some zeo tests to fail

Benji York benji at zope.com
Wed Jun 21 18:26:03 EDT 2006


Log message for revision 68785:
  fix mechanize bug that caused some zeo tests to fail
  

Changed:
  U   Zope3/trunk/src/mechanize/_mechanize.py

-=-
Modified: Zope3/trunk/src/mechanize/_mechanize.py
===================================================================
--- Zope3/trunk/src/mechanize/_mechanize.py	2006-06-21 21:54:07 UTC (rev 68784)
+++ Zope3/trunk/src/mechanize/_mechanize.py	2006-06-21 22:26:01 UTC (rev 68785)
@@ -46,7 +46,8 @@
         del self._history[:]
     def close(self):
         for request, response in self._history:
-            response.close()
+            if response is not None:
+                response.close()
         del self._history[:]
 
 # Horrible, but needed, at least until fork urllib2.  Even then, may want



More information about the Zope3-Checkins mailing list