CLOUDSTACK-3049: marvin-nose causes other plugins to fail when not enabled

enabled by default. Running regular nosetests with plugins other than
marvin will fail because of this. Failure manifests itself as nose
looking for the config file when using the marivn-nose plugin

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Prasanna Santhanam 2013-06-18 15:06:46 +05:30
parent 97eb35c82b
commit 746af2bb6f

View File

@ -34,9 +34,15 @@ class MarvinPlugin(Plugin):
"""
name = "marvin"
def configure(self, options, config):
self.enabled = 1
self.enableOpt = "--with-marvin"
if hasattr(options,self.enableOpt):
if not getattr(options, self.enableOpt):
self.enabled = False
return
else:
self.enabled = True
self.logformat = logging.Formatter("%(asctime)s - %(levelname)s - %(name)s - %(message)s")
if options.debug_log: