mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
add nodata fix
This commit is contained in:
@ -88,7 +88,7 @@ import jc.parsers.universal
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.0'
|
version = '1.1'
|
||||||
description = 'airport -s command parser'
|
description = 'airport -s command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -170,8 +170,10 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if not quiet:
|
if not quiet:
|
||||||
jc.utils.compatibility(__name__, info.compatible)
|
jc.utils.compatibility(__name__, info.compatible)
|
||||||
|
|
||||||
cleandata = data.splitlines()
|
raw_output = []
|
||||||
|
cleandata = list(filter(None, data.splitlines()))
|
||||||
|
|
||||||
|
if cleandata:
|
||||||
# fix headers
|
# fix headers
|
||||||
cleandata[0] = cleandata[0].lower()
|
cleandata[0] = cleandata[0].lower()
|
||||||
cleandata[0] = cleandata[0].replace('-', '_')
|
cleandata[0] = cleandata[0].replace('-', '_')
|
||||||
|
Reference in New Issue
Block a user