In the standard fabric example, we have
def test():
with settings(warn_only=True):
result = local('./manage.py test my_app', capture=True)
if result.failed and not confirm("Tests failed. Continue anyway?"):
abort("Aborting at user request.")
Is there any way to check the status of an entire method?
For instance,
def method1():
run_this_as_sudo
run_this_as_sudo
How do I check to see if the entire method failed in fabric as opposed to looking at each individual method call? Is the only way to handle this to add some sort of try catch on every method that is composed of multiple shell commands?