[New-bugs-announce] [issue39828] json.tool should catch BrokenPipeError
STINNER Victor
report at bugs.python.org
Mon Mar 2 10:30:28 EST 2020
New submission from STINNER Victor <vstinner at python.org>:
The json.tool module doesn't catch BrokenPipeError:
-----------------------
$ echo "{}" | python3 -m json.tool | true
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib64/python3.7/json/tool.py", line 45, in <module>
main()
File "/usr/lib64/python3.7/json/tool.py", line 41, in main
outfile.write('\n')
BrokenPipeError: [Errno 32] Broken pipe
-----------------------
json.tool should catch BrokenPipeError.
----------
components: Library (Lib)
messages: 363185
nosy: vstinner
priority: normal
severity: normal
status: open
title: json.tool should catch BrokenPipeError
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39828>
_______________________________________
More information about the New-bugs-announce
mailing list