diff Lib/subprocess.py @ 34110:05f8a4fec356 2.4

Raise TypeError if bufsize argument is not an integer. Patch 1071755, slightly modified.
author Peter Astrand <astrand@lysator.liu.se>
date Sun, 05 Dec 2004 20:05:04 +0000
parents 8cecb8dc43a3
children 1f7cf8521bb5 73b09c2b788b
line wrap: on
line diff
--- a/Lib/subprocess.py	Sun Dec 05 07:49:00 2004 +0000
+++ b/Lib/subprocess.py	Sun Dec 05 20:05:04 2004 +0000
@@ -504,6 +504,9 @@
         """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 "