summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-11-11 08:04:52 (GMT)
committerGregory P. Smith <greg@krypto.org>2012-11-11 08:04:52 (GMT)
commit6893732c353ed7cbd2492164aa2b7c64a9f1c840 (patch)
tree0d49846980a8261990edceb43977436898e54b45 /Lib/subprocess.py
parent1f83866ecd07cf1b06f630c24a9092d3449955f6 (diff)
parent3aee2221229b9802dcc27b2709d5e97918b8ad46 (diff)
downloadcpython-6893732c353ed7cbd2492164aa2b7c64a9f1c840.zip
cpython-6893732c353ed7cbd2492164aa2b7c64a9f1c840.tar.gz
cpython-6893732c353ed7cbd2492164aa2b7c64a9f1c840.tar.bz2
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 db0ba19..dad7b16 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -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'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)