Mercurial > hg
changeset 16649:822e75386c16 stable
bugzilla: fix transport initialization on python 2.4
author | Steven Stallion <sstallion@gmail.com> |
---|---|
date | Fri, 11 May 2012 22:48:19 -0700 |
parents | e6dfbc5df76f |
children | fcb97d9a26cd |
files | hgext/bugzilla.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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.