[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.0.4-testing] Fix _login to pass arguments to the server unconditionally, rather than



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1166400880 0
# Node ID 469478194aef6e987f9281efbc0756749be6eb80
# Parent  d7150286ca7be1b70fae6c31f49f7022867939f9
Fix _login to pass arguments to the server unconditionally, rather than
requiring precisely two on the client-side.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xm/XenAPI.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -r d7150286ca7b -r 469478194aef tools/python/xen/xm/XenAPI.py
--- a/tools/python/xen/xm/XenAPI.py     Mon Dec 18 00:07:55 2006 +0000
+++ b/tools/python/xen/xm/XenAPI.py     Mon Dec 18 00:14:40 2006 +0000
@@ -84,23 +84,23 @@ class Session(xen.util.xmlrpclib2.Server
 
     def xenapi_request(self, methodname, params):
         if methodname.startswith('login'):
-            self._login(methodname, *params)
+            self._login(methodname, params)
             return None
         else:
             full_params = (self._session,) + params
             return _parse_result(getattr(self, methodname)(*full_params))
 
 
-    def _login(self, method, username, password):
+    def _login(self, method, params):
         self._session = _parse_result(
-            getattr(self, 'session.%s' % method)(username, password))
+            getattr(self, 'session.%s' % method)(*params))
 
 
     def __getattr__(self, name):
         if name == 'xenapi':
             return _Dispatcher(self.xenapi_request, None)
         elif name.startswith('login'):
-            return lambda u, p: self._login(name, u, p)
+            return lambda *params: self._login(name, params)
         else:
             return xen.util.xmlrpclib2.ServerProxy.__getattr__(self, name)
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.