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-unstable] Cope with a response that's not a diction

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Cope with a response that's not a dictionary.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Dec 2006 05:10:06 -0800
Delivery-date: Fri, 22 Dec 2006 05:10:36 -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 1166787253 0
# Node ID f7ac2c963f772e905f56c3c8ad0af57893628774
# Parent  f1ddc050d848c5c1c1c846d06f3930e34e7811d7
Cope with a response that's not a dictionary.

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

diff -r f1ddc050d848 -r f7ac2c963f77 tools/python/xen/xm/XenAPI.py
--- a/tools/python/xen/xm/XenAPI.py     Thu Dec 21 20:44:35 2006 +0000
+++ b/tools/python/xen/xm/XenAPI.py     Fri Dec 22 11:34:13 2006 +0000
@@ -106,7 +106,7 @@ class Session(xen.util.xmlrpclib2.Server
 
 
 def _parse_result(result):
-    if 'Status' not in result:
+    if type(result) != dict or 'Status' not in result:
         raise xmlrpclib.Fault(500, 'Missing Status in response from server')
     if result['Status'] == 'Success':
         if 'Value' in result:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Cope with a response that's not a dictionary., Xen patchbot-unstable <=