mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
formatting
This commit is contained in:
@ -125,14 +125,14 @@ Returns:
|
|||||||
```python
|
```python
|
||||||
stream_success(output_line, ignore_exceptions)
|
stream_success(output_line, ignore_exceptions)
|
||||||
```
|
```
|
||||||
add _jc_meta object to output line if -qq (ignore_exceptions) option is used
|
Add `_jc_meta` object to output line if `ignore_exceptions=True`
|
||||||
|
|
||||||
## stream_error
|
## stream_error
|
||||||
```python
|
```python
|
||||||
stream_error(e, ignore_exceptions, line)
|
stream_error(e, ignore_exceptions, line)
|
||||||
```
|
```
|
||||||
reraise the stream exception with annotation or print an error _jc_meta
|
Reraise the stream exception with annotation or print an error `_jc_meta`
|
||||||
field if ignore_exceptions=True
|
field if `ignore_exceptions=True`
|
||||||
|
|
||||||
|
|
||||||
## timestamp
|
## timestamp
|
||||||
|
@ -210,7 +210,7 @@ def convert_to_bool(value):
|
|||||||
|
|
||||||
|
|
||||||
def stream_success(output_line, ignore_exceptions):
|
def stream_success(output_line, ignore_exceptions):
|
||||||
"""add _jc_meta object to output line if -qq (ignore_exceptions) option is used"""
|
"""Add `_jc_meta` object to output line if `ignore_exceptions=True`"""
|
||||||
if ignore_exceptions:
|
if ignore_exceptions:
|
||||||
output_line.update({'_jc_meta': {'success': True}})
|
output_line.update({'_jc_meta': {'success': True}})
|
||||||
|
|
||||||
@ -218,8 +218,8 @@ def stream_success(output_line, ignore_exceptions):
|
|||||||
|
|
||||||
|
|
||||||
def stream_error(e, ignore_exceptions, line):
|
def stream_error(e, ignore_exceptions, line):
|
||||||
"""reraise the stream exception with annotation or print an error _jc_meta
|
"""Reraise the stream exception with annotation or print an error `_jc_meta`
|
||||||
field if ignore_exceptions=True
|
field if `ignore_exceptions=True`
|
||||||
"""
|
"""
|
||||||
if not ignore_exceptions:
|
if not ignore_exceptions:
|
||||||
e.args = (str(e) + '... Use the ignore_exceptions option (-qq) to ignore streaming parser errors.',)
|
e.args = (str(e) + '... Use the ignore_exceptions option (-qq) to ignore streaming parser errors.',)
|
||||||
|
Reference in New Issue
Block a user