[Zope3-checkins] SVN: Zope3/branches/3.3/src/mechanize/_util.py apply revision 69378 to 3.3 branch

Benji York benji at zope.com
Tue Aug 8 17:11:16 EDT 2006


Log message for revision 69379:
  apply revision 69378 to 3.3 branch
  

Changed:
  U   Zope3/branches/3.3/src/mechanize/_util.py

-=-
Modified: Zope3/branches/3.3/src/mechanize/_util.py
===================================================================
--- Zope3/branches/3.3/src/mechanize/_util.py	2006-08-08 21:07:27 UTC (rev 69378)
+++ Zope3/branches/3.3/src/mechanize/_util.py	2006-08-08 21:11:15 UTC (rev 69379)
@@ -439,6 +439,10 @@
             return self.__cache.read(size)
 
         # no, so read sufficient data from wrapped file and cache it
+        if self.wrapped.read is None:
+            # XXX oops, wrapped file-like-object isn't valid, ignore it
+            return ''
+
         self.__cache.seek(0, 2)
         if size == -1:
             self.__cache.write(self.wrapped.read())



More information about the Zope3-Checkins mailing list