Skip to content
Snippets Groups Projects
Verified Commit 239c49e5 authored by David Hoese's avatar David Hoese
Browse files

Fixed level 0 parser for new version 3 format with 33 elements

parent d5f4b596
No related branches found
No related tags found
No related merge requests found
...@@ -159,9 +159,9 @@ class ParserV1V2(object): ...@@ -159,9 +159,9 @@ class ParserV1V2(object):
def make_frame(self, line): def make_frame(self, line):
parts = line.split(',') parts = line.split(',')
if len(parts) not in [28, 29]: if len(parts) not in [28, 29, 33]:
raise LineParseError("Expected 28 or 29 parts", line) raise LineParseError("Expected 28, 29, or 33 parts", line)
version = 1 if len(parts) == 28 else 2 version = {28: 1, 29: 2, 33: 3}[len(parts)]
raw_data = [('version', version)] + list(zip(self.names, parts)) raw_data = [('version', version)] + list(zip(self.names, parts))
try: try:
raw_data.append(('stamp', self._get_stamp(parts))) raw_data.append(('stamp', self._get_stamp(parts)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment