(temporarily) revert cset 13174:766eec31afab since it seems to break 64-bit;

a proper fix will arrive in the new year.

Signed-off-by: Steven Hand <steven@xensource.com>
This commit is contained in:
Steven Hand committed 2006-12-29 18:17:56 +00:00
1 parent 3dcbf823b3
commit f8512e1c61
1 file changed
+3 -17
+3 -17
View File
@@ -50,7 +50,7 @@ import xmlrpclib
import xen.util.xmlrpclib2
translation = gettext.translation('xen-xm')
gettext.install('xen-xm')
class Failure(Exception):
def __init__(self, details):
@@ -68,7 +68,7 @@ class Failure(Exception):
def __str__(self):
try:
return translation.ugettext(self.details[0]) % self._details_map()
return _(self.details[0]) % self._details_map()
except TypeError, exn:
return "Message database broken: %s.\nXen-API failure: %s" % \
(exn, str(self.details))
@@ -108,8 +108,6 @@ class Session(xen.util.xmlrpclib2.ServerProxy):
encoding, verbose,
allow_none)
self._session = None
self.last_login_method = None
self.last_login_params = None
def xenapi_request(self, methodname, params):
@@ -123,11 +121,7 @@ class Session(xen.util.xmlrpclib2.ServerProxy):
result = _parse_result(getattr(self, methodname)(*full_params))
if result == _RECONNECT_AND_RETRY:
retry_count += 1
if self.last_login_method:
self._login(self.last_login_method,
self.last_login_params)
else:
raise xmlrpclib.Fault(401, 'You must log in')
self._login(self.last_login_method, self.last_login_params)
else:
return result
raise xmlrpclib.Fault(
@@ -178,18 +172,10 @@ class _Dispatcher:
def __init__(self, send, name):
self.__send = send
self.__name = name
def __repr__(self):
if self.__name:
return '<XenAPI._Dispatcher for %s>' % self.__name
else:
return '<XenAPI._Dispatcher>'
def __getattr__(self, name):
if self.__name is None:
return _Dispatcher(self.__send, name)
else:
return _Dispatcher(self.__send, "%s.%s" % (self.__name, name))
def __call__(self, *args):
return self.__send(self.__name, args)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.