diff options
author | Peter Astrand <astrand@lysator.liu.se> | 2004-12-05 20:05:04 (GMT) |
---|---|---|
committer | Peter Astrand <astrand@lysator.liu.se> | 2004-12-05 20:05:04 (GMT) |
commit | 9bff72f0a1a85ae4682c625c94c41643ef2447c5 (patch) | |
tree | 8a49fa6ce75c96b92428dfb5ade782f1a1dca691 /Lib/subprocess.py | |
parent | c0331de34a77f5f6f94a2124d4a414e873ac9671 (diff) | |
download | cpython-9bff72f0a1a85ae4682c625c94c41643ef2447c5.zip cpython-9bff72f0a1a85ae4682c625c94c41643ef2447c5.tar.gz cpython-9bff72f0a1a85ae4682c625c94c41643ef2447c5.tar.bz2 |
Raise TypeError if bufsize argument is not an integer. Patch 1071755, slightly modified.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 8d0204e..9e326fb 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -504,6 +504,9 @@ class Popen(object): """Create new Popen instance.""" _cleanup() + if not isinstance(bufsize, (int, long)): + raise TypeError("bufsize must be an integer") + if mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " |