From 746af2bb6f5d356a0ea3fd274d192e2eb9bb83a0 Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Tue, 18 Jun 2013 15:06:46 +0530 Subject: [PATCH] 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 --- tools/marvin/marvin/marvinPlugin.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py index 46a8a4f3445..846f73577c1 100644 --- a/tools/marvin/marvin/marvinPlugin.py +++ b/tools/marvin/marvin/marvinPlugin.py @@ -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: