If parsing fails on body after succeeding on head, return the

partially-parsed packet as part of the error.
This commit is contained in:
Bill Mitchell 2018-02-07 12:52:01 -06:00 committed by Rossen Georgiev
parent a14da1d78d
commit 3a12e45342
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ def parse(packet):
# capture ParseErrors and attach the packet
except (UnknownFormat, ParseError) as exp:
exp.packet = packet
exp.parsed = parsed
raise
# if we fail all attempts to parse, try beacon packet