-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Milestone
Description
from invoke import task
@task
def preTask(ctx):
print("preTask")
@task
def testTask(ctx, otherTask=preTask):
print("otherTask @ ", otherTask)spits out
Traceback (most recent call last):
File "/usr/bin/inv", line 11, in <module>
sys.exit(program.run())
File "/usr/lib/python2.7/site-packages/invoke/program.py", line 269, in run
self._parse(argv)
File "/usr/lib/python2.7/site-packages/invoke/program.py", line 329, in _parse
self.parse_tasks()
File "/usr/lib/python2.7/site-packages/invoke/program.py", line 490, in parse_tasks
self.parser = Parser(contexts=self.collection.to_contexts())
File "/usr/lib/python2.7/site-packages/invoke/collection.py", line 325, in to_contexts
name=primary, aliases=aliases, args=task.get_arguments()
File "/usr/lib/python2.7/site-packages/invoke/tasks.py", line 205, in get_arguments
new_arg = Argument(**self.arg_opts(name, default, taken_names))
File "/usr/lib/python2.7/site-packages/invoke/tasks.py", line 180, in arg_opts
if default not in (None, NO_DEFAULT):
File "/usr/lib/python2.7/site-packages/invoke/tasks.py", line 83, in __eq__
if self.name != other.name:
AttributeError: 'NoneType' object has no attribute 'name'
I was originally doing something really dumb because I didn't understand how invoke worked, but I came across this weird case. Feel free to close this.