summaryrefslogtreecommitdiff
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-11-11 00:04:13 -0800
committerGregory P. Smith <greg@krypto.org>2012-11-11 00:04:13 -0800
commitec9258dff16a6bb7566c6302d30e7976a6356b5e (patch)
tree5b7ae6127196c196fe53237a68eea5037ad8115b /Lib/subprocess.py
parenta920112c0e330d601ca4c33aad528f0a00c445df (diff)
downloadcpython-ec9258dff16a6bb7566c6302d30e7976a6356b5e.tar.gz
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.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 18e9ed73a8..fcc3e6e3ba 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1371,11 +1371,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'RuntimeError'
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'),
RuntimeError)