From bb1c70b3d8eedde6dfa2cb992ebd1e9f6ed1cdab Mon Sep 17 00:00:00 2001 From: miguelaferreira Date: Wed, 23 Jul 2014 13:50:47 +0200 Subject: [PATCH] Test if config specifies a zone before using it Signed-off-by: Santhosh Edukulla --- tools/marvin/marvin/marvinInit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/marvin/marvin/marvinInit.py b/tools/marvin/marvin/marvinInit.py index ce9b43f1ad0..56ea5098135 100644 --- a/tools/marvin/marvin/marvinInit.py +++ b/tools/marvin/marvin/marvinInit.py @@ -111,7 +111,7 @@ class MarvinInit: if not self.__hypervisorType: self.__hypervisorType = XEN_SERVER if not self.__zoneForTests: - if self.__parsedConfig: + if self.__parsedConfig and self.__parsedConfig.zones is not None: for zone in self.__parsedConfig.zones: self.__zoneForTests = zone.name break