1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

Improve and standardize empty data check for all parsers

This commit is contained in:
Kelly Brazil
2020-06-14 17:17:40 -07:00
parent 2af61730f0
commit cc0f0971d7
56 changed files with 449 additions and 412 deletions

View File

@ -83,7 +83,7 @@ import jc.utils
class info():
version = '1.2'
version = '1.3'
description = 'w command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
@ -151,7 +151,8 @@ def parse(data, raw=False, quiet=False):
cleandata = data.splitlines()[1:]
raw_output = []
if list(filter(None, cleandata)):
if jc.utils.has_data(data):
header_text = cleandata[0].lower()
# fixup for 'from' column that can be blank
from_col = header_text.find('from')