only import callable classes that have the 'status' attribute
authorTony Mack <tmack@cs.princeton.edu>
Tue, 8 Jan 2008 20:53:47 +0000 (20:53 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 8 Jan 2008 20:53:47 +0000 (20:53 +0000)
qaapi/qa/QAAPI.py

index d632368..056d7a5 100644 (file)
@@ -97,7 +97,7 @@ class QAAPI:
 
            for attribute in dir(module):
                attr = getattr(module, attribute)
-               if callable(attr):
+               if callable(attr) and hasattr(attr, 'status'):
                    setattr(attr, 'mod_name', module_basename+"."+attribute)
                    callables.append(attr(self.config))
            return callables