Test for unsupported formats after testing for supported formats.
This commit is contained in:
parent
e73d1e9a2d
commit
264d19b8b3
|
|
@ -158,11 +158,8 @@ def parse(packet):
|
|||
def _try_toparse_body(packet_type, body, parsed):
|
||||
result = {}
|
||||
|
||||
if packet_type in unsupported_formats:
|
||||
raise UnknownFormat('format is not supported: {0}'.format(unsupported_formats[packet_type]))
|
||||
|
||||
# user defined
|
||||
elif packet_type == ',':
|
||||
if packet_type == ',':
|
||||
logger.debug("Packet is invalid format")
|
||||
|
||||
body, result = parse_invalid(body)
|
||||
|
|
@ -203,6 +200,11 @@ def _try_toparse_body(packet_type, body, parsed):
|
|||
|
||||
body, result = parse_position(packet_type, body)
|
||||
|
||||
# other data types
|
||||
elif packet_type in unsupported_formats:
|
||||
raise UnknownFormat('format is not supported: {0}'.format(unsupported_formats[packet_type]))
|
||||
|
||||
|
||||
# we are done
|
||||
parsed.update(result)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue