[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Adjust the argument counts for a MESSAGE_PARAMETER_COUNT_MISMATCH to account for
# HG changeset patch # User Ewan Mellor <ewan@xxxxxxxxxxxxx> # Date 1167057161 0 # Node ID 4e079a8496b7521f60562d09ca285c0dd436c37d # Parent 367f0c6efe2178e26ba0194ca795ff098e22a80b Adjust the argument counts for a MESSAGE_PARAMETER_COUNT_MISMATCH to account for the fact that XenAPI adds the session handle transparently. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> --- tools/python/xen/xm/XenAPI.py | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletion(-) diff -r 367f0c6efe21 -r 4e079a8496b7 tools/python/xen/xm/XenAPI.py --- a/tools/python/xen/xm/XenAPI.py Sat Dec 23 21:32:05 2006 +0000 +++ b/tools/python/xen/xm/XenAPI.py Mon Dec 25 14:32:41 2006 +0000 @@ -54,7 +54,17 @@ gettext.install('xen-xm') class Failure(Exception): def __init__(self, details): - self.details = details + try: + # If this failure is MESSAGE_PARAMETER_COUNT_MISMATCH, then we + # correct the return values here, to account for the fact that we + # transparently add the session handle as the first argument. + if details[0] == 'MESSAGE_PARAMETER_COUNT_MISMATCH': + details[2] = str(int(details[2]) - 1) + details[3] = str(int(details[3]) - 1) + + self.details = details + except Exception, exn: + self.details = ['INTERNAL_ERROR', 'Client-side: ' + str(exn)] def __str__(self): try: _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |