Skip to content

Commit 448dcfa

Browse files
committed
improving for-loop code
1 parent f80da2a commit 448dcfa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

eessi_bot_job_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ def get_current_jobs(self):
127127
# get job info, logging any Slurm issues
128128
# Note, all output lines of squeue are processed because we run it with
129129
# --noheader.
130-
for i in range(0, len(lines)):
131-
job = lines[i].rstrip().split()
130+
for line in lines:
131+
job = line.rstrip().split()
132132
if len(job) >= 9:
133133
job_id = job[0]
134134
state = job[4]

0 commit comments

Comments
 (0)