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

use stream_error function for exceptions

This commit is contained in:
Kelly Brazil
2021-09-13 18:29:49 -07:00
parent 27eb427245
commit dab9357d28

View File

@ -98,15 +98,4 @@ def parse(data, raw=False, quiet=False):
yield _process(output_line) yield _process(output_line)
except Exception as e: except Exception as e:
if not quiet: yield jc.utils.stream_error(e, quiet, line)
e.args = (str(e) + '... Use the quiet option (-q) to ignore errors.',)
raise e
else:
yield {
'_meta':
{
'success': False,
'error': 'error parsing line',
'line': line.strip()
}
}