mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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>
This commit is contained in:
1 parent
f245784ba0
commit
9b981ee160
1 file changed
+5
-2
@@ -238,8 +238,11 @@ class TCPXMLRPCServer(SocketServer.ThreadingMixIn, SimpleXMLRPCServer):
|
||||
|
||||
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.
|
||||
|
||||