WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.0.4-testing] Fix _login to pass arguments to the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.0.4-testing] Fix _login to pass arguments to the server unconditionally, rather than
From: "Xen patchbot-3.0.4-testing" <patchbot-3.0.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Dec 2006 10:45:27 -0800
Delivery-date: Tue, 19 Dec 2006 03:16:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.0.4-testing] Fix _login to pass arguments to the server unconditionally, rather than, Xen patchbot-3.0.4-testing <=