hgext/bugzilla.py
branchstable
changeset 16649 822e75386c16
parent 16227 7855c522a9cb
child 16683 525fdb738975
child 16876 fdc879042414
--- 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.