direct-io.hg

changeset 14147:339e477d2548

Fix exception handling to cope with exceptions that do not have a string as
the first argument.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Feb 27 11:19:25 2007 +0000 (2007-02-27)
parents 0a9da94c904a
children b67c253d1cdb
files tools/python/xen/util/xmlrpclib2.py
line diff
     1.1 --- a/tools/python/xen/util/xmlrpclib2.py	Tue Feb 27 06:06:29 2007 -0500
     1.2 +++ b/tools/python/xen/util/xmlrpclib2.py	Tue Feb 27 11:19:25 2007 +0000
     1.3 @@ -238,8 +238,11 @@ class TCPXMLRPCServer(SocketServer.Threa
     1.4  
     1.5  notSupportedRE = re.compile(r'method "(.*)" is not supported')
     1.6  def _is_not_supported(exn):
     1.7 -    m = notSupportedRE.search(exn[0])
     1.8 -    return m is not None
     1.9 +    try:
    1.10 +        m = notSupportedRE.search(exn[0])
    1.11 +        return m is not None
    1.12 +    except TypeError, e:
    1.13 +        return False
    1.14  
    1.15  
    1.16  # This is a XML-RPC server that sits on a Unix domain socket.