Skip to content

Commit

Permalink
Merge pull request #4711 from jedwards4b/fix_rpointer_doesnt_exist
Browse files Browse the repository at this point in the history
make sure file exists before assigning
  • Loading branch information
jedwards4b authored Dec 5, 2024
2 parents f285060 + 86cb6d1 commit 902dc84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions CIME/case/case_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,9 @@ def case_run(self, skip_pnl=False, set_continue_run=False, submit_resubmits=Fals
if drv_restart_pointer:
pattern = os.path.join(rundir, "rpointer.cpl*")
files = sorted(glob.glob(pattern), key=os.path.getmtime)
drv_ptr = os.path.basename(files[-1])
self.set_value("DRV_RESTART_POINTER", drv_ptr)
if files:
drv_ptr = os.path.basename(files[-1])
self.set_value("DRV_RESTART_POINTER", drv_ptr)
model_log(
"e3sm",
logger,
Expand Down
2 changes: 1 addition & 1 deletion CIME/non_py/cprnc
3 changes: 1 addition & 2 deletions CIME/wait_for_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os, time, threading, socket, signal, shutil, glob

# pylint: disable=import-error
from distutils.spawn import find_executable
import logging
import xml.etree.ElementTree as xmlet

Expand Down Expand Up @@ -516,7 +515,7 @@ def create_cdash_xml(
hostname,
cdash_build_name,
cdash_project,
find_executable("scp"),
shutil.which("scp"),
cdash_timestamp,
drop_method,
)
Expand Down

0 comments on commit 902dc84

Please sign in to comment.