mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Raise TypeError if bufsize argument is not an integer. Patch 1071755, slightly modified.
This commit is contained in:
parent
6fdf3cbb13
commit
738131d391
2 changed files with 14 additions and 0 deletions
|
|
@ -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 "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue