[bugzilla-gnome-org-extensions] splinter_proxy.py: Python-2.4 compat for xmlrpclib.Transport.__init__



commit f21c05e1b164fe2e5301da34dabf5165d0368be8
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Sep 28 14:37:38 2009 -0400

    splinter_proxy.py: Python-2.4 compat for xmlrpclib.Transport.__init__
    
    Python 2.4 doesn't have xmlrpclib.Transport.__init__, so check
    for existence before calling it.

 proxy/splinter_proxy.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/proxy/splinter_proxy.py b/proxy/splinter_proxy.py
index 7ac785f..e70c0d7 100755
--- a/proxy/splinter_proxy.py
+++ b/proxy/splinter_proxy.py
@@ -306,7 +306,8 @@ def check_login_headers(headers):
 # subclass.
 class LoginTransport(xmlrpclib.Transport):
     def __init__(self, scheme, hostname, port):
-        xmlrpclib.Transport.__init__(self)
+        if hasattr(xmlrpclib.Transport, '__init__'):
+            xmlrpclib.Transport.__init__(self)
         self.scheme = scheme
         self.hostname = hostname
         self.port = port


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]