bugzilla: fix transport initialization on python 2.4 stable
authorSteven Stallion <sstallion@gmail.com>
Fri, 11 May 2012 22:48:19 -0700
branchstable
changeset 16649 822e75386c16
parent 16641 e6dfbc5df76f
child 16650 fcb97d9a26cd
bugzilla: fix transport initialization on python 2.4
hgext/bugzilla.py
--- a/hgext/bugzilla.py	Tue May 08 14:46:04 2012 -0700
+++ b/hgext/bugzilla.py	Fri May 11 22:48:19 2012 -0700
@@ -585,11 +585,13 @@
 # inheritance with a new-style class.
 class cookietransport(cookietransportrequest, xmlrpclib.Transport):
     def __init__(self, use_datetime=0):
-        xmlrpclib.Transport.__init__(self, use_datetime)
+        if util.safehasattr(xmlrpclib.Transport, "__init__"):
+            xmlrpclib.Transport.__init__(self, use_datetime)
 
 class cookiesafetransport(cookietransportrequest, xmlrpclib.SafeTransport):
     def __init__(self, use_datetime=0):
-        xmlrpclib.SafeTransport.__init__(self, use_datetime)
+        if util.safehasattr(xmlrpclib.Transport, "__init__"):
+            xmlrpclib.SafeTransport.__init__(self, use_datetime)
 
 class bzxmlrpc(bzaccess):
     """Support for access to Bugzilla via the Bugzilla XMLRPC API.