first, with the remainder following. Should
@runs_once
@task(task_class=CustomTask, myarg='value', alias='ata')
def wrapped_custom_taska(instance):
print("wrapped_custom_taska()")
File "xxxxxx/local/lib/python2.7/site-packages/fabric/decorators.py", line 136, in runs_once
@wraps(func)
File "/usr/lib/python2.7/functools.py", line 33, in update_wrapper
setattr(wrapper, attr, getattr(wrapped, attr))
AttributeError: 'CustomTask' object has no attribute '__name__'
I believe this is expected behavior.
What is notable, is that if @task() does not have a task_class specified, WrappedCallableTask is used. When given the two fab task functions:
@task(task_class=CustomTask, myarg='value', alias='ata')
@runs_once
def wrapped_custom_taska(instance):
print("wrapped_custom_taska()")
# WrappedCallableTask
@task()
@runs_once
def wrapped_custom_taskc():
print("wrapped_custom_task()")