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:
@ -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)
|
||||||
|
Reference in New Issue
Block a user