def call(cmd):
try:
return subprocess.call(cmd, shell=False)
except Exception:
print('[Error] executing command: ' + cmd)
print(str(sys.exc_info()[1]))
executing command: git clone –verbose git://github.com/python-git/python.git
No such file or directory
executing command: git remote rename origin upstream
No such file or directory
В чем пробема?
Это тоже не работает: subprocess.call('git.sh branch')
Кстати, под виндой subprocess.call('mvn clean deploy') тоже падал
Оказалось, батники subprocess.call() запускать так не умеет и нужно указывать расширение:
subprocess.call('mvn.bat clean deploy')
только тогда все ок.
На сервере стоит: Python 2.4.3