From aa21dd91f4432ea3e122808acd69bc71c776e8aa Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 29 Jun 2019 13:36:14 -0600 Subject: [PATCH] Cast finidat_rtm get_value to string, so can use .strip on it, no matter what --- cime_config/buildnml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cime_config/buildnml b/cime_config/buildnml index 3486746509..0084220307 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -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") @@ -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':