我正在运行fabric来部署我的django应用程序。我发出以下命令:
run('cd $(path); mkdir releases; mkdir shared; mkdir packages;', fail='ignore')
但是我得到了一个错误:
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/fabric/main.py", line 419, in main
commands[name](*args, **kwargs)
File "/home/davidh/django/fabfile.py", line 34, in setup
run('cd $(path); mkdir releases; mkdir shared; mkdir packages;', fail='ignore')
File "/usr/lib/pymodules/python2.6/fabric/network.py", line 382, in host_prompting_wrapper
return func(*args, **kwargs)
TypeError: run() got an unexpected keyword argument 'fail'
任何想法?我是否需要为使用'fail'导入额外的东西? THX
答案 0 :(得分:3)
run
未执行失败命令:http://docs.fabfile.org/0.9.3/api/core/operations.html#fabric.operations.run
也许您的意思是with settings(warn_only=True):
:http://docs.fabfile.org/0.9.3/api/core/context_managers.html#fabric.context_managers.settings