mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
check for enough info to parse
This commit is contained in:
@ -26,6 +26,8 @@ def parse(data):
|
||||
output = {}
|
||||
parsed_line = data.split(maxsplit=3)
|
||||
|
||||
if len(parsed_line) > 1:
|
||||
|
||||
output['kernel_name'] = parsed_line.pop(0)
|
||||
output['node_name'] = parsed_line.pop(0)
|
||||
output['kernel_release'] = parsed_line.pop(0)
|
||||
|
Reference in New Issue
Block a user