Skip to content

Commit

Permalink
Revert remaining changes to hist_utils.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsrabin committed Jan 18, 2025
1 parent 9c8c2b3 commit f48d5cf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CIME/hist_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,11 @@ def _generate_baseline_impl(case, baseline_dir=None, allow_baseline_overwrite=Fa
if not os.path.isdir(basegen_dir):
os.makedirs(basegen_dir)

if os.path.isdir(os.path.join(basegen_dir, testcase)):
if not allow_baseline_overwrite:
expect(False, " Cowardly refusing to overwrite existing baseline directory")
if (
os.path.isdir(os.path.join(basegen_dir, testcase))
and not allow_baseline_overwrite
):
expect(False, " Cowardly refusing to overwrite existing baseline directory")

comments = "Generating baselines into '{}'\n".format(basegen_dir)
num_gen = 0
Expand Down

0 comments on commit f48d5cf

Please sign in to comment.