diff --git a/tools/marvin/marvin/configGenerator.py b/tools/marvin/marvin/configGenerator.py index ba639ff9882..7967ab43ccd 100644 --- a/tools/marvin/marvin/configGenerator.py +++ b/tools/marvin/marvin/configGenerator.py @@ -380,7 +380,7 @@ def generate_setup_config(config, file=None): def get_setup_config(file): if not os.path.exists(file): - return None + raise IOError("config file %s not found. please specify a valid config file"%file) config = cloudstackConfiguration() fp = open(file, 'r') config = json.load(fp) diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py index aa40b00fba8..39b5e4e6f26 100644 --- a/tools/marvin/marvin/deployDataCenter.py +++ b/tools/marvin/marvin/deployDataCenter.py @@ -15,6 +15,7 @@ import configGenerator import cloudstackException import cloudstackTestClient import sys +import os import logging from cloudstackAPI import * from optparse import OptionParser @@ -22,6 +23,8 @@ from optparse import OptionParser class deployDataCenters(): def __init__(self, cfgFile): + if not os.path.exists(cfgFile): + raise IOError("config file %s not found. please specify a valid config file"%cfgFile) self.configFile = cfgFile def addHosts(self, hosts, zoneId, podId, clusterId, hypervisor):