Skip to content
Snippets Groups Projects
Commit 04cf1c71 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

Changed mkexp configuration to allow sensible defaults for local desktops

parent 8ade5fca
No related branches found
No related tags found
No related merge requests found
......@@ -70,9 +70,9 @@ class ExpConfig(ConfigObj):
experiment_type = extra_dict.get('EXP_TYPE', pre_config['EXP_TYPE'])
environment = extra_dict.get('ENVIRONMENT',
pre_config.get('ENVIRONMENT',
'local'))
ExpConfig.default_name))
# Backwards compatibility ENVIRONMENT -> QUEUE_TYPE
if environment == 'local' and 'QUEUE_TYPE' in pre_config:
if environment == ExpConfig.default_name and 'QUEUE_TYPE' in pre_config:
feedback.warning("found obsolete keyword 'QUEUE_TYPE'; "
"should be replaced by 'ENVIRONMENT'")
environment = pre_config['QUEUE_TYPE']
......@@ -116,9 +116,11 @@ class ExpConfig(ConfigObj):
lib_config_name = os.path.join(ExpConfig.env_lib_dir,
environment+'.config')
pre_config.merge(ConfigObj(lib_config_name, interpolation=False))
config_versions.append(pre_config['VERSION_'])
del pre_config['VERSION_']
if os.path.exists(lib_config_name):
pre_config.merge(ConfigObj(lib_config_name, interpolation=False))
config_versions.append(pre_config['VERSION_'])
del pre_config['VERSION_']
# Re-read config to allow overriding default settings
# TODO: probably nicer if default experiment is given as argument
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment