def __init__(self, config_file, workspace_dir):
if not os.path.isfile(config_file):
raise Exception("Error: file {} does not "
"exist.".format(config_file))
config = configparser.ConfigParser()
config.read(config_file)
for section in config.sections():
section_options = self.get_config_options_for_section(config,
section)
self.validate_config_options_for_section(section_options, section)
if section == RUNWAY_CONFIG_SECTION:
self.runway_options = section_options
else:
self.sections.append(section)
self.components_options[section] = section_options
self.workspace_dir = workspace_dir
评论列表
文章目录