[PATCH stable] bugzilla: fix transport initialization on python 2.4
Steven Stallion
sstallion at gmail.com
Sat May 12 00:48:26 CDT 2012
# HG changeset patch
# User Steven Stallion <sstallion at gmail.com>
# Date 1336801699 25200
# Node ID af7714b922e3dae2265e45e3674f1315ac0823ca
# Parent 1388cc711ea70387ec648ded919e854c94e36c04
bugzilla: fix transport initialization on python 2.4
diff -r 1388cc711ea7 -r af7714b922e3 hgext/bugzilla.py
--- a/hgext/bugzilla.py Tue May 08 15:31:00 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.
More information about the Mercurial-devel
mailing list