Skip to content

Commit

Permalink
Merge pull request #425 from jedwards4b/namelist_compare_fix
Browse files Browse the repository at this point in the history
fix issue matching case name if case has both G and C actions

compare_namelists was failing if the case has both Generate and Compare flags
  • Loading branch information
jgfouca authored Aug 18, 2016
2 parents aec4b2f + 39b5632 commit 0221d99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/python/CIME/compare_namelists.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def parse_namelists(namelist_lines, filename):
expect(multiline_variable is None,
"In file '%s', Incomplete multiline variable: '%s'" % (filename, multiline_variable[0] if multiline_variable is not None else ""))

# Unfornately, other tools were using the old compare_namelists.pl script
# Unfortunately, other tools were using the old compare_namelists.pl script
# to compare files that are not namelist files. We need a special error
# to signify this event
if (namelist_re.match(line) is None):
Expand Down Expand Up @@ -192,7 +192,7 @@ def normalize_string_value(name, value, case):
"""
# Any occurance of case must be normalized because test-ids might not match
if (case is not None):
case_re = re.compile(r'%s[.]([GC])[.]([^./\s]+)' % case)
case_re = re.compile(r'%s[.]([GC]+)[.]([^./\s]+)' % case)
value = case_re.sub("%s.ACTION.TESTID" % case, value)

if (name in ["runid", "model_version", "username"]):
Expand Down

0 comments on commit 0221d99

Please sign in to comment.