mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Remove the subprocess "bad exception data" warning (formerly a print!)
all together and just include the repr of the data in the exception itself instead of the useless string "Unknown". This code path is unlikely to even be possible to take given the nature of the pipe it gets subprocess data from.
This commit is contained in:
commit
d4b645ef42
2 changed files with 5 additions and 3 deletions
|
@ -1412,11 +1412,10 @@ class Popen(object):
|
|||
exception_name, hex_errno, err_msg = (
|
||||
errpipe_data.split(b':', 2))
|
||||
except ValueError:
|
||||
warnings.warn(RuntimeWarning(
|
||||
'Bad exception data: %r' % errpipe_data))
|
||||
exception_name = b'SubprocessError'
|
||||
hex_errno = b'0'
|
||||
err_msg = b'Unknown'
|
||||
err_msg = (b'Bad exception data from child: ' +
|
||||
repr(errpipe_data))
|
||||
child_exception_type = getattr(
|
||||
builtins, exception_name.decode('ascii'),
|
||||
SubprocessError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue