[New-bugs-announce] [issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

Noah report at bugs.python.org
Thu Jun 6 18:16:29 EDT 2019


New submission from Noah <nlevitt at archive.org>:

Suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

with subprocess.Popen('/bin/false'):
    pass

I made the mistake of assuming this construct would raise an exception (CalledProcessError). It would be nice if there were a way to do that.

----------
components: Library (Lib)
messages: 344880
nosy: nlevitt
priority: normal
severity: normal
status: open
title: suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37184>
_______________________________________


More information about the New-bugs-announce mailing list