comparison hgext/bugzilla.py @ 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 7855c522a9cb
children 525fdb738975 fdc879042414
comparison
equal deleted inserted replaced
16641:e6dfbc5df76f 16649:822e75386c16
583 # necessary. The xmlrpclib.Transport classes are old-style classes, and 583 # necessary. The xmlrpclib.Transport classes are old-style classes, and
584 # it turns out their __init__() doesn't get called when doing multiple 584 # it turns out their __init__() doesn't get called when doing multiple
585 # inheritance with a new-style class. 585 # inheritance with a new-style class.
586 class cookietransport(cookietransportrequest, xmlrpclib.Transport): 586 class cookietransport(cookietransportrequest, xmlrpclib.Transport):
587 def __init__(self, use_datetime=0): 587 def __init__(self, use_datetime=0):
588 xmlrpclib.Transport.__init__(self, use_datetime) 588 if util.safehasattr(xmlrpclib.Transport, "__init__"):
589 xmlrpclib.Transport.__init__(self, use_datetime)
589 590
590 class cookiesafetransport(cookietransportrequest, xmlrpclib.SafeTransport): 591 class cookiesafetransport(cookietransportrequest, xmlrpclib.SafeTransport):
591 def __init__(self, use_datetime=0): 592 def __init__(self, use_datetime=0):
592 xmlrpclib.SafeTransport.__init__(self, use_datetime) 593 if util.safehasattr(xmlrpclib.Transport, "__init__"):
594 xmlrpclib.SafeTransport.__init__(self, use_datetime)
593 595
594 class bzxmlrpc(bzaccess): 596 class bzxmlrpc(bzaccess):
595 """Support for access to Bugzilla via the Bugzilla XMLRPC API. 597 """Support for access to Bugzilla via the Bugzilla XMLRPC API.
596 598
597 Requires a minimum Bugzilla version 3.4. 599 Requires a minimum Bugzilla version 3.4.