Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with module tasks throws exception #441

Closed
mitchellh opened this issue Sep 23, 2011 · 1 comment
Closed

Bug with module tasks throws exception #441

mitchellh opened this issue Sep 23, 2011 · 1 comment
Labels
Milestone

Comments

@mitchellh
Copy link

Hello,

If you import a module and get the nice task of "module.task" format, you can get fabric to explode by calling "fab module"

This is with Fabric 1.2.2

For example, I have a module named "foo.py"

from fabric.api import task

@task
def hello():
    print "HELLO!"

Then the fabfile:

import foo

Then when you do a fab foo (shouldn't be valid):

Traceback (most recent call last):
  File "/etc/virtualenvs/tornado-web/lib/python2.6/site-packages/fabric/main.py", line 778, in main
    _run_task(task, args, kwargs)
  File "/etc/virtualenvs/tornado-web/lib/python2.6/site-packages/fabric/main.py", line 629, in _run_task
    return task(*args, **kwargs)
TypeError: '_Dict' object is not callable

I think it should instead say something like the following:


Fatal error: Command(s) not found:
    foo

Aborting.

Best,
Mitchell

@ghost ghost assigned bitprophet Sep 23, 2011
@bitprophet
Copy link
Member

Fixed for both 1.1 (no @task(default) available) and 1.2 (@task(default) taken into account).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants