From: Tony Mack Date: Tue, 8 Jan 2008 20:53:47 +0000 (+0000) Subject: only import callable classes that have the 'status' attribute X-Git-Tag: 2008-02-11-last-vmware-support~175 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=bedb10416562973ca8f5f18f18f1563c5ff10274;p=tests.git only import callable classes that have the 'status' attribute --- diff --git a/qaapi/qa/QAAPI.py b/qaapi/qa/QAAPI.py index d632368..056d7a5 100644 --- a/qaapi/qa/QAAPI.py +++ b/qaapi/qa/QAAPI.py @@ -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