Skip to content

Commit 90a142f

Browse files
committed
runtime/lava: in get_log_parser dont crash if log is missing
Signed-off-by: Denys Fedoryshchenko <[email protected]>
1 parent f16f2fd commit 90a142f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kernelci/runtime/lava.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,10 @@ def get_hierarchy(self, results, job_node):
280280

281281
def get_log_parser(self):
282282
"""Get a LogParser object from the callback data"""
283-
return LogParser(self._data['log'])
283+
log = self._data.get('log')
284+
if not log:
285+
return None
286+
return LogParser(log)
284287

285288
def to_file(self, filename):
286289
"""Write the callback data to a JSON file"""

0 commit comments

Comments
 (0)