Skip to content

Commit

Permalink
Get datenames once, outside the archive_entry loop
Browse files Browse the repository at this point in the history
In principle, I'd think this should give the same behavior
  • Loading branch information
billsacks committed Aug 31, 2017
1 parent 751fd7a commit 02c1616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/lib/CIME/case_st_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ def _archive_process(case, archive, last_date, archive_incomplete_logs, copy_onl
# archive log files
_archive_log_files(case, archive_incomplete_logs, archive_file_fn)

datenames = _get_datenames(case, last_date)
for archive_entry in archive.get_entries():
# determine compname and compclass
compname, compclass = archive.get_entry_info(archive_entry)
Expand All @@ -365,7 +366,6 @@ def _archive_process(case, archive, last_date, archive_incomplete_logs, copy_onl
logger.info('-------------------------------------------')
logger.info('doing short term archiving for {} ({})'.format(compname, compclass))
logger.info('-------------------------------------------')
datenames = _get_datenames(case, last_date)
for datename in datenames:
logger.info('Archiving for date %s' % datename)
datename_is_last = False
Expand Down

0 comments on commit 02c1616

Please sign in to comment.