[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fix exception handling to cope with exceptions that do not have a string as
# HG changeset patch # User Ewan Mellor <ewan@xxxxxxxxxxxxx> # Date 1172575165 0 # Node ID 339e477d2548a0372a93a9d041dd7a087b14171e # Parent 0a9da94c904a53e390b0109f203d100ca6b5cdb1 Fix exception handling to cope with exceptions that do not have a string as the first argument. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> --- tools/python/xen/util/xmlrpclib2.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff -r 0a9da94c904a -r 339e477d2548 tools/python/xen/util/xmlrpclib2.py --- a/tools/python/xen/util/xmlrpclib2.py Tue Feb 27 06:06:29 2007 -0500 +++ b/tools/python/xen/util/xmlrpclib2.py Tue Feb 27 11:19:25 2007 +0000 @@ -238,8 +238,11 @@ class TCPXMLRPCServer(SocketServer.Threa notSupportedRE = re.compile(r'method "(.*)" is not supported') def _is_not_supported(exn): - m = notSupportedRE.search(exn[0]) - return m is not None + try: + m = notSupportedRE.search(exn[0]) + return m is not None + except TypeError, e: + return False # This is a XML-RPC server that sits on a Unix domain socket. _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |