我正在尝试执行如下脚本“test.py”,但遇到以下错误。
import subprocess
from subprocess import Popen, PIPE, STDOUT
verifygerritscmd = ("python test.py --InputFile=list.txt --Project=location/code --branch=master")
gerritPipe = Popen(verifygerritscmd, stdout=PIPE, stderr=PIPE)
(output, error) = gerritPipe.communicate()
if error != "":
print error
raise IOError, "gerrit command %s failed" % (gerritCmd)
print output
错误:
Traceback (most recent call last):
File "test_anoop.py", line 4, in <module>
gerritPipe = Popen(verifygerritscmd, stdout=PIPE, stderr=PIPE)
File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
知道这里可能有什么问题吗?