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:
@ -176,7 +176,7 @@ def parse(data, raw=False, quiet=False):
|
|||||||
|
|
||||||
raw_output = []
|
raw_output = []
|
||||||
|
|
||||||
if len(data) > 1:
|
if list(filter(None, data.splitlines())):
|
||||||
# if the first field is a device, use normal parsing:
|
# if the first field is a device, use normal parsing:
|
||||||
if data.split(maxsplit=1)[0][-1] == ':':
|
if data.split(maxsplit=1)[0][-1] == ':':
|
||||||
linedata = data.splitlines()
|
linedata = data.splitlines()
|
||||||
|
Reference in New Issue
Block a user