Merge "Add fault-tolerant process of lack of OS section in daisy.conf"

This commit is contained in:
Jenkins 2016-10-25 09:17:28 +00:00 committed by Gerrit Code Review
commit 82245fa9d9

View File

@ -61,8 +61,10 @@ BACKENDS_UNINSTALL_ORDER = []
config = ConfigParser.ConfigParser()
config.read(daisy_cmn.daisy_conf_file)
OS_INSTALL_TYPE = 'pxe'
OS_INSTALL_TYPE = config.get("OS", "os_install_type")
try:
OS_INSTALL_TYPE = config.get("OS", "os_install_type")
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
OS_INSTALL_TYPE = 'pxe'
def get_deployment_backends(req, cluster_id, backends_order):