From b1aec4ea9fe87c91f6ba6ab37925f7461b9b9c49 Mon Sep 17 00:00:00 2001 From: akremin Date: Fri, 30 Aug 2024 17:55:00 -0700 Subject: [PATCH] rename var in dash so doesnt collide with logger log --- py/desispec/scripts/procdashboard.py | 6 +++--- py/desispec/scripts/zprocdashboard.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/py/desispec/scripts/procdashboard.py b/py/desispec/scripts/procdashboard.py index 8f86cf8c0..0b5b17a8d 100644 --- a/py/desispec/scripts/procdashboard.py +++ b/py/desispec/scripts/procdashboard.py @@ -524,11 +524,11 @@ def count_num_files(ftype, expid=None): newest_jobid, logfile = 0, None - for log in lognames: - jobid = int(log.split('-')[-1].split('.')[0]) + for itlog in lognames: + jobid = int(itlog.split('-')[-1].split('.')[0]) if jobid > newest_jobid: newest_jobid = jobid - logname = log + logname = itlog if newest_jobid > 0: slurmname = logname.replace(f'-{jobid}.log', '.slurm') slurm_hlink = _hyperlink(os.path.relpath(slurmname, webpage), 'Slurm') diff --git a/py/desispec/scripts/zprocdashboard.py b/py/desispec/scripts/zprocdashboard.py index 3b6fe8f87..44017ada9 100644 --- a/py/desispec/scripts/zprocdashboard.py +++ b/py/desispec/scripts/zprocdashboard.py @@ -554,11 +554,11 @@ def populate_night_zinfo(night, doem=True, doqso=True, dotileqa=True, dozmtl=Tru lognames = glob.glob(templatelog) newest_jobid, logfile = 0, None - for log in lognames: - jobid = int(log.split('-')[-1].split('.')[0]) + for itlog in lognames: + jobid = int(itlog.split('-')[-1].split('.')[0]) if jobid > newest_jobid: newest_jobid = jobid - logname = log + logname = itlog if newest_jobid > 0: slurmname = logname.replace(f'-{jobid}.log', '.slurm') slurm_hlink = _hyperlink(os.path.relpath(slurmname, webpage), 'Slurm')