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:
Ewan Mellor committed 2007-02-27 11:19:25 +00:00
1 parent f245784ba0
commit 9b981ee160
1 file changed
+5 -2
+5 -2
View File
@@ -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.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.