Commit 6629a3f6 authored by Jeremy Hylton's avatar Jeremy Hylton

Oops. The type test is necessary. issubclass() can raise a TypeError.

parent 2ea428bb
......@@ -306,6 +306,7 @@ class Connection(smac.SizedMessageAsyncConnection):
assert r_msgid == msgid, "%s != %s: %s" % (r_msgid, msgid, r_args)
if (isinstance(r_args, types.TupleType)
and type(r_args[0]) == types.ClassType
and issubclass(r_args[0], Exception)):
inst = r_args[1]
raise inst # error raised by server
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment