diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py
index e6dfbc5df76fe96f73ca204b1d10cd27a814e890_aGdleHQvYnVnemlsbGEucHk=..822e75386c16f1622daa8a1d368441b3b3b7993f_aGdleHQvYnVnemlsbGEucHk= 100644
--- a/hgext/bugzilla.py
+++ b/hgext/bugzilla.py
@@ -585,7 +585,8 @@
 # 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):
@@ -589,7 +590,8 @@
 
 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.