1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

clean up raw/processed logic

This commit is contained in:
Kelly Brazil
2022-11-01 19:53:44 -07:00
parent 186ad73651
commit 2b060aae0d

View File

@ -136,10 +136,11 @@ def parse(data, raw=False, quiet=False):
if jc.utils.has_data(data): if jc.utils.has_data(data):
has_data = True has_data = True
if raw:
if has_data:
# modified output with _ prefix for attributes # modified output with _ prefix for attributes
raw_output = xmltodict.parse(data, attr_prefix='_') raw_output = xmltodict.parse(data, attr_prefix='_')
if raw:
return raw_output return raw_output
else:
return _process(data, has_data) return _process(data, has_data)