From 32f45694ee9f606a1cf04c8bafa512dc0c2648ca Mon Sep 17 00:00:00 2001 From: acidvegas Date: Tue, 30 May 2023 03:30:58 -0400 Subject: [PATCH] Fixed parser not handling booleans --- parser.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/parser.py b/parser.py index af2e5e9..615acf1 100644 --- a/parser.py +++ b/parser.py @@ -32,10 +32,12 @@ if len(sys.argv) >= 2: if option in data: data = data[option] if type(data) == str: - found.append(parse(data, raw)) + found.append(parse(option, data, raw)) elif type(data) == list: 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: for item in data: _data = data[item] @@ -45,6 +47,8 @@ if len(sys.argv) >= 2: for _item in _data: if option in _item: found.append(parse(option, _item, raw)) + elif type(_data) == bool: + found.append(parse(option, str(_item), raw)) if found: print(f'\nfound {len(found)} results in {len(logs)} logs') else: