1

我正在运行 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'

有任何想法吗?我需要导入一些额外的东西来使用“失败”吗?谢谢

4

1 回答 1

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

于 2010-12-09T00:49:02.717 回答