Commit af8a8370 authored by Julien Muchembled's avatar Julien Muchembled

neolog: fix crash on unknown packets

parent 9e543d76
......@@ -119,9 +119,11 @@ class Log(object):
p = self.Packets[code]
msg = p.__name__
except KeyError:
Packets[code] = p = type('UnknownPacket[%u]' % code, (object,), {})
msg = ['#0x%04x %-30s %s' % (msg_id, p.__name__, peer)]
msg = 'UnknownPacket[%u]' % code
body = None
msg = ['#0x%04x %-30s %s' % (msg_id, msg, peer)]
if body is not None:
logger = getattr(self, p.handler_method_name, None)
if logger or self._decode_all:
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