Author: tomaz
Date: Tue Mar 5 04:00:49 2013
New Revision: 1452656
URL: http://svn.apache.org/r1452656
Log:
Fix a regression in the gandi drivers introduced by xmlrpclib changes. Part of
LIBCLOUD-288.
Reported by Hutson Betts
Modified:
libcloud/trunk/libcloud/common/gandi.py
Modified: libcloud/trunk/libcloud/common/gandi.py
URL:
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/gandi.py?rev=1452656&r1=1452655&r2=1452656&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/gandi.py (original)
+++ libcloud/trunk/libcloud/common/gandi.py Tue Mar 5 04:00:49 2013
@@ -57,6 +57,14 @@ class GandiConnection(XMLRPCConnection,
host = 'rpc.gandi.net'
endpoint = '/xmlrpc/'
+ def __init__(self, key, password=None):
+ # Note: Method resolution order in this case is
+ # XMLRPCConnection -> Connection and Connection doesn't take key as the
+ # first argument so we specify a keyword argument instead.
+ # Previously it was GandiConnection -> ConnectionKey so it worked fine.
+ super(GandiConnection, self).__init__(key=key)
+ self.driver = BaseGandiDriver
+
def request(self, method, *args):
args = (self.key, ) + args
return super(GandiConnection, self).request(method, *args)