Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Exception subclasses should not be shown in "fab -l" #1365
To reproduce, create a fabfile.py with contents "class Foo(Exception): pass", then "fab -l" will list it as an available command.
I suppose this happens because callable(Foo) is True, but since using an Exception as a fabric command is nonsense, I would expect this to generate an error like "Fatal error: Fabfile didn't contain any commands!" just like if I had a fabfile consisting only of contents "Foo=",
For real fabfiles, this clutters up the namespace and it's annoying to have to do the "from module import SomeException as _SomeException" workaround.