Commit 02763c9a authored by Julien Muchembled's avatar Julien Muchembled

Fix handling of error packets

This fixes a regression in commit 4720ba33.
parent d62476dd
...@@ -167,9 +167,10 @@ class HandlerSwitcher(object): ...@@ -167,9 +167,10 @@ class HandlerSwitcher(object):
return return
# checkout the expected answer class # checkout the expected answer class
try: try:
klass, timeout, _, kw = request_dict.pop(msg_id) klass, _, _, kw = request_dict.pop(msg_id)
except KeyError: except KeyError:
klass = None klass = None
kw = {}
if klass and isinstance(packet, klass) or packet.isError(): if klass and isinstance(packet, klass) or packet.isError():
handler.packetReceived(connection, packet, kw) handler.packetReceived(connection, packet, kw)
else: else:
......
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