在你的fabfile中加入这样的东西:
from fabric.context_managers import settings
def task_name():
# commands that are not expected to fail
...
with settings(warn_only=True):
# commands that might fail
...
clean_up()
Run Code Online (Sandbox Code Playgroud)
warn_only=True如果你不在乎,你甚至可能想要给整个任务一个治疗:
@with_settings(warn_only=True)
def task_name():
...
Run Code Online (Sandbox Code Playgroud)
(更多信息)
| 归档时间: |
|
| 查看次数: |
1071 次 |
| 最近记录: |