add some error handling to juggle log loading

old-commit-hash: 5c51516839c0bc86a44c7183a9c396896b7eca44
This commit is contained in:
Willem Melching
2021-02-19 11:19:02 +01:00
parent 6dc4597c56
commit 16f7cae050
+7 -3
View File
@@ -14,9 +14,13 @@ from tools.lib.logreader import LogReader
def load_segment(segment_name):
print(f"Loading {segment_name}")
lr = LogReader(segment_name)
r = [d for d in lr if d.which() not in ['can', 'sendcan']]
return r
try:
lr = LogReader(segment_name)
r = [d for d in lr if d.which() not in ['can', 'sendcan']]
return r
except ValueError as e:
print(f"Error parsing {segment_name}: {e}")
return []
def juggle_file(fn):
env = os.environ.copy()