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:
@ -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')
|
||||
|
Reference in New Issue
Block a user