extras-buildsys/common HTTPServer.py,1.3,1.4

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Thu Jul 7 19:10:16 UTC 2005


Author: dcbw

Update of /cvs/fedora/extras-buildsys/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2727/common

Modified Files:
	HTTPServer.py 
Log Message:
Fix for python 2.2


Index: HTTPServer.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/common/HTTPServer.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- HTTPServer.py	7 Jul 2005 17:45:02 -0000	1.3
+++ HTTPServer.py	7 Jul 2005 19:10:14 -0000	1.4
@@ -67,14 +67,15 @@
             path = os.path.join(path, word)
         return path
 
-    def handle(self):
-        """ Always close the connection when done """
-        self.close_connection = 1
-
-        try:
-            self.handle_one_request()
-        except SSL.Error, e:
-            print e[0]
+    if sys.version_info[:3] >= (2, 3, 0):
+        def handle(self):
+            """ Always close the connection when done """
+            self.close_connection = 1
+
+            try:
+                self.handle_one_request()
+            except SSL.Error, e:
+                print e[0]
 
 
 class PlgHTTPSServer(SSLCommon.PlgBaseSSLServer):




More information about the scm-commits mailing list