mirror of
git://git.acid.vegas/IRCP.git
synced 2024-11-26 01:46:39 +00:00
Fixed parser not handling booleans
This commit is contained in:
parent
c4e528aa5a
commit
32f45694ee
@ -32,10 +32,12 @@ if len(sys.argv) >= 2:
|
|||||||
if option in data:
|
if option in data:
|
||||||
data = data[option]
|
data = data[option]
|
||||||
if type(data) == str:
|
if type(data) == str:
|
||||||
found.append(parse(data, raw))
|
found.append(parse(option, data, raw))
|
||||||
elif type(data) == list:
|
elif type(data) == list:
|
||||||
for item in data:
|
for item in data:
|
||||||
found.append(parse(item, raw))
|
found.append(option, parse(item, raw))
|
||||||
|
elif type(data) == bool:
|
||||||
|
found.append(parse(option, str(item), raw))
|
||||||
else:
|
else:
|
||||||
for item in data:
|
for item in data:
|
||||||
_data = data[item]
|
_data = data[item]
|
||||||
@ -45,6 +47,8 @@ if len(sys.argv) >= 2:
|
|||||||
for _item in _data:
|
for _item in _data:
|
||||||
if option in _item:
|
if option in _item:
|
||||||
found.append(parse(option, _item, raw))
|
found.append(parse(option, _item, raw))
|
||||||
|
elif type(_data) == bool:
|
||||||
|
found.append(parse(option, str(_item), raw))
|
||||||
if found:
|
if found:
|
||||||
print(f'\nfound {len(found)} results in {len(logs)} logs')
|
print(f'\nfound {len(found)} results in {len(logs)} logs')
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user