From 02c161654c3c026aad2c4691470fe9d2ad37b060 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Thu, 31 Aug 2017 05:36:35 -0600 Subject: [PATCH] Get datenames once, outside the archive_entry loop In principle, I'd think this should give the same behavior --- scripts/lib/CIME/case_st_archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/CIME/case_st_archive.py b/scripts/lib/CIME/case_st_archive.py index 3f469655bbb..dadb1527823 100644 --- a/scripts/lib/CIME/case_st_archive.py +++ b/scripts/lib/CIME/case_st_archive.py @@ -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) @@ -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