Skip to content

Commit afccf3f

Browse files
committed
makefile: elapsed time python code fewer red lines in editor
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent a008f1c commit afccf3f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

flow/util/genElapsedTime.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
parser.print_help()
2626
sys.exit(1)
2727

28+
2829
def print_log_dir_times(logdir):
2930
first = True
3031
totalElapsed = 0
@@ -55,24 +56,28 @@ def print_log_dir_times(logdir):
5556
elapsedTime = int(timeList[0])*60 + int(timeList[1])
5657
elif len(timeList) == 3:
5758
# Hours, minutes, and seconds are present
58-
elapsedTime = int(timeList[0])*3600 + int(timeList[1])*60 + int(timeList[2])
59+
elapsedTime = (int(timeList[0])*3600 +
60+
int(timeList[1])*60 + int(timeList[2]))
5961
else:
60-
print('Elapsed time not understood in', str(line), file=sys.stderr)
62+
print('Elapsed time not understood in',
63+
str(line), file=sys.stderr)
6164

6265
if not found:
63-
print('No elapsed time found in', str(f), file=sys.stderr)
66+
print('No elapsed time found in', str(f), file=sys.stderr)
6467
continue
6568

6669
# Print the name of the step and the corresponding elapsed time
6770
if elapsedTime != 0:
6871
if first and not args.noHeader:
6972
print("%-25s %10s" % ("Log", "Elapsed seconds"))
7073
first = False
71-
print('%-25s %10s' % (os.path.splitext(os.path.basename(str(f)))[0], elapsedTime))
74+
print('%-25s %10s' % (os.path.splitext(
75+
os.path.basename(str(f)))[0], elapsedTime))
7276
totalElapsed += elapsedTime
7377

7478
if totalElapsed != 0:
75-
print("%-25s %10s" % ( "Total", totalElapsed ))
79+
print("%-25s %10s" % ("Total", totalElapsed))
80+
7681

7782
for log_dir in args.logDir:
7883
print_log_dir_times(log_dir)

0 commit comments

Comments
 (0)