Message176047
The TypeError message when a call to subprocess.Popen() lacks the args argument is incorrect.
For 3.3 and 3.4, the message incorrectly says that a positional argument is required when a keyword argument will do:
>>> import subprocess
>>> subprocess.Popen()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() missing 1 required positional argument: 'args'
>>> subprocess.Popen(args=['test'])
<subprocess.Popen object at 0x10bed4840>
For 3.2 and 2.7, the problem is slightly different. It says that two arguments are needed and that two have been given:
>>> subprocess.Popen()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() takes at least 2 arguments (1 given)
>>> subprocess.Popen(shell=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() takes at least 2 arguments (2 given)
I don't know if this issue affects other functions in the standard library, but I suspect it might. |
|
Date |
User |
Action |
Args |
2012-11-21 08:45:12 | chris.jerdonek | set | recipients:
+ chris.jerdonek |
2012-11-21 08:45:12 | chris.jerdonek | set | messageid: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za> |
2012-11-21 08:45:12 | chris.jerdonek | link | issue16520 messages |
2012-11-21 08:45:12 | chris.jerdonek | create | |
|