Skip to content

Commit

Permalink
use enumerate
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Feb 4, 2021
1 parent 5f559af commit 011bef1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/DIRAC/Core/scripts/install_full.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ LocalInstallation

# The list of Agents to be installed
Agents = Framework/CAUpdateAgent
Agents += DataManagement/FTSAgent
Agents += DataManagement/FTS3Agent
Agents += WorkloadManagement/PilotStatusAgent
Agents += WorkloadManagement/SiteDirector
Agents += WorkloadManagement/JobCleaningAgent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division

__RCSID__ = "$Id$"

import logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ def main():
fieldLengths.append(len(param))

for record in records:
for i in range(len(record)):
for i, _ in enumerate(record):
if paramNames[i] in fieldsToShow:
fieldLengths[i] = max(fieldLengths[i], len(str(record[i])))
# Print time!
line = []
sepLine = []
for i in range(len(paramNames)):
param = paramNames[i]
for i, param in enumerate(paramNames):
if param in fieldsToShow:
line.append("%s%s" % (param, " " * (fieldLengths[i] - len(param))))
sepLine.append("-" * fieldLengths[i])
Expand All @@ -46,7 +45,7 @@ def main():
print(sepLine)
for record in records:
line = []
for i in range(len(record)):
for i, _ in enumerate(record):
if paramNames[i] in fieldsToShow:
val = str(record[i])
line.append("%s%s" % (val, " " * (fieldLengths[i] - len(val))))
Expand Down

0 comments on commit 011bef1

Please sign in to comment.