thedjinn/fabutil — Issue #1: Wrapped tasks do not return anything
Author: raja-baz
Created: 2011-12-15 14:22:18+00:00
State: open

Essentially, when using the @task decorator, the return value of a task gets ignored. So, say I have a sub-task foo() and I want foo() to benefit from the (really nice) colorization and indentation of the output, there's no way I can have foo() return a value.

The problem is in nested_task.py in the definition of myrun() inside task()
It should be:

def myrun(self, *args, **kwargs):
print green(">>> entering ") + green("%s" % func.__name__, True)
indenter.push()
ret = self.oldrun(*args, **kwargs)
indenter.pop()
print green(">>> leaving ") + green("%s" % func.__name__, True)
return ret