[wwwsearch-commits] r33290 - wwwsearch/mechanize/trunk/mechanize

jjlee at codespeak.net jjlee at codespeak.net
Sat Oct 14 21:46:51 CEST 2006


Author: jjlee
Date: Sat Oct 14 21:46:50 2006
New Revision: 33290

Modified:
   wwwsearch/mechanize/trunk/mechanize/_seek.py
   wwwsearch/mechanize/trunk/mechanize/_upgrade.py
Log:
In revision 32987, I added tests for responses being None in too many places (processors don't need those tests)

Modified: wwwsearch/mechanize/trunk/mechanize/_seek.py
==============================================================================
--- wwwsearch/mechanize/trunk/mechanize/_seek.py	(original)
+++ wwwsearch/mechanize/trunk/mechanize/_seek.py	Sat Oct 14 21:46:50 2006
@@ -6,6 +6,6 @@
     """Make responses seekable."""
 
     def any_response(self, request, response):
-        if response is not None and not hasattr(response, "seek"):
+        if not hasattr(response, "seek"):
             return response_seek_wrapper(response)
         return response

Modified: wwwsearch/mechanize/trunk/mechanize/_upgrade.py
==============================================================================
--- wwwsearch/mechanize/trunk/mechanize/_upgrade.py	(original)
+++ wwwsearch/mechanize/trunk/mechanize/_upgrade.py	Sat Oct 14 21:46:50 2006
@@ -29,7 +29,6 @@
     # upgrade responses to be .close()able without becoming unusable
     handler_order = 0  # before anything else
     def any_response(self, request, response):
-        if (response is not None and
-            not hasattr(response, 'closeable_response')):
+        if not hasattr(response, 'closeable_response'):
             response = upgrade_response(response)
         return response


More information about the wwwsearch-commits mailing list