[Python-checkins] python/dist/src/Lib urllib2.py,1.79,1.80

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sat Feb 5 15:37:11 CET 2005


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13622

Modified Files:
	urllib2.py 
Log Message:
SF patch #1028908
(John J Lee)

Minor code clarification and simplification.



Index: urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- urllib2.py	9 Jan 2005 05:51:49 -0000	1.79
+++ urllib2.py	5 Feb 2005 14:37:06 -0000	1.80
@@ -304,10 +304,13 @@
                 self.handle_error[protocol] = lookup
             elif condition == "open":
                 kind = protocol
-                lookup = getattr(self, "handle_"+condition)
-            elif condition in ["response", "request"]:
+                lookup = self.handle_open
+            elif condition == "response":
                 kind = protocol
-                lookup = getattr(self, "process_"+condition)
+                lookup = self.process_response
+            elif condition == "request":
+                kind = protocol
+                lookup = self.process_request
             else:
                 continue
 



More information about the Python-checkins mailing list