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

simplify last item logic

This commit is contained in:
Kelly Brazil
2022-01-05 11:44:00 -08:00
parent 5c934c43c1
commit 7b20cffb14

View File

@ -274,8 +274,8 @@ def parse(data, raw=False, quiet=False, ignore_exceptions=False):
output_line = {} output_line = {}
# gather final item # gather final item
try:
if output_line: if output_line:
try:
yield stream_success(output_line, ignore_exceptions) if raw else stream_success(_process(output_line), ignore_exceptions) yield stream_success(output_line, ignore_exceptions) if raw else stream_success(_process(output_line), ignore_exceptions)
except Exception as e: except Exception as e:
yield stream_error(e, ignore_exceptions, line) yield stream_error(e, ignore_exceptions, line)