def _command(
fabric_method,
command,
ignore_errors=False,
quiet=True,
hide=('running', 'aborts'),
show=(),
abort_exception=RuntimeError,
**kwargs
):
if quiet:
hide += ('output', 'warnings')
log('{method}: {command}'.format(
method=fabric_method.__name__,
command=command,
))
with fab.settings(
fab.hide(*hide),
fab.show(*show),
abort_exception=abort_exception,
warn_only=ignore_errors,
):
return fabric_method(command, **kwargs)
评论列表
文章目录