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

Added deprecation warning for .* keywords in run script generator.

parent 7d1c7334
No related branches found
No related tags found
No related merge requests found
......@@ -119,6 +119,10 @@ def format_value(value, indent):
def cut_remove_list(section, key):
remove_list = []
if key in section:
# Deprecation warning for non .keys
if key[0] != '.':
feedback.warning("keyword '"+key+"' is deprecated, "
"use '."+key+"' instead")
if isinstance(section[key], basestring):
remove_list = [section[key]]
else:
......@@ -296,7 +300,13 @@ for subjob, subconfig in config['jobs'].iteritems():
for namelist, groups in job_config['namelists'].iteritems():
if isinstance(groups, dict):
namelist_name = re.sub(r'\W', '_', namelist.upper())
if groups.get('use_template'):
if groups.get('.use_template') or groups.get('use_template'):
# Support deprecated keyword 'use_template' but warn user
if groups.get('use_template'):
feedback.warning("keyword 'use_template' is "
"deprecated, use '.use_template' instead")
job_config[namelist_name] = \
expand_template(groups, get_template_name(namelist))
else:
......
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