Skip to content

Instantly share code, notes, and snippets.

@bitprophet
Created June 7, 2011 00:57
Show Gist options
  • Save bitprophet/1011462 to your computer and use it in GitHub Desktop.
Save bitprophet/1011462 to your computer and use it in GitHub Desktop.
diff --git a/fabric/main.py b/fabric/main.py
index 33f2f47..89a1cec 100644
--- a/fabric/main.py
+++ b/fabric/main.py
@@ -167,7 +167,7 @@ def is_task_module(a):
Determine if the provided value is a task module
"""
return (type(a) is types.ModuleType and
- getattr(a, "FABRIC_TASK_MODULE", False))
+ any(map(is_task_object, vars(a).values())))
def is_task_object(a):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment