1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

enhance empty data check

This commit is contained in:
Kelly Brazil
2020-06-11 17:13:45 -07:00
parent d2ccad6a83
commit 52b1272a3a

View File

@ -176,7 +176,7 @@ def parse(data, raw=False, quiet=False):
raw_output = []
if len(data) > 1:
if list(filter(None, data.splitlines())):
# if the first field is a device, use normal parsing:
if data.split(maxsplit=1)[0][-1] == ':':
linedata = data.splitlines()