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] Fix exception handling when xmlrpclib.Fau

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix exception handling when xmlrpclib.Fault is raised, in legacy mode.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Mar 2007 13:30:15 -0700
Delivery-date: Tue, 20 Mar 2007 13:30:15 -0700
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 1174399467 0
# Node ID cb7b69311abb3c7638f36bd2730101c8c7433667
# Parent  e7c6e6621e852b4560305b68e2db4d62ed8e8fc7
Fix exception handling when xmlrpclib.Fault is raised, in legacy mode.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/util/xmlrpclib2.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -r e7c6e6621e85 -r cb7b69311abb tools/python/xen/util/xmlrpclib2.py
--- a/tools/python/xen/util/xmlrpclib2.py       Tue Mar 20 11:49:04 2007 +0000
+++ b/tools/python/xen/util/xmlrpclib2.py       Tue Mar 20 14:04:27 2007 +0000
@@ -241,10 +241,13 @@ class TCPXMLRPCServer(SocketServer.Threa
                              "ErrorDescription": errdesc },),
                           methodresponse = 1)
                 else:
-                    log.exception('Internal error handling %s', method)
                     import xen.xend.XendClient
-                    response = xmlrpclib.dumps(
-                       xmlrpclib.Fault(xen.xend.XendClient.ERROR_INTERNAL, 
str(exn)))
+                    if isinstance(exn, xmlrpclib.Fault):
+                        response = xmlrpclib.dumps(exn)
+                    else:
+                        log.exception('Internal error handling %s', method)
+                        response = xmlrpclib.dumps(
+                            
xmlrpclib.Fault(xen.xend.XendClient.ERROR_INTERNAL, str(exn)))
             except:
                 log.exception('Internal error handling error')
 

_______________________________________________
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] Fix exception handling when xmlrpclib.Fault is raised, in legacy mode., Xen patchbot-unstable <=