Skip to content

Commit

Permalink
Cast finidat_rtm get_value to string, so can use .strip on it, no mat…
Browse files Browse the repository at this point in the history
…ter what
  • Loading branch information
ekluzek committed Jun 29, 2019
1 parent 6f59e05 commit aa21dd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
#----------------------------------------------------

run_type = case.get_value("RUN_TYPE")
finidat_rtm = str(nmlgen.get_value("finidat_rtm"))
if run_type == 'branch' or run_type == 'hybrid':
run_refcase = case.get_value("RUN_REFCASE")
run_refdate = case.get_value("RUN_REFDATE")
Expand All @@ -77,7 +78,7 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
nmlgen.add_default("finidat_rtm", value=filename, ignore_abs_path=True)
else:
nmlgen.add_default("nrevsn_rtm", value=filename)
elif nmlgen.get_value("finidat_rtm").strip() == '':
elif finidat_rtm.strip() == '':
nmlgen.set_value('finidat_rtm', value=' ')
else:
if nmlgen.get_default('finidat_rtm') == 'UNSET':
Expand Down

0 comments on commit aa21dd9

Please sign in to comment.