1
0
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:
Kelly Brazil
2019-10-25 19:27:02 -07:00
parent a3d43f27f7
commit d3c89a3092

View File

@ -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)