donate-cpu-server.py: Format total times like the package times.

Without formatting it could happen sometimes that the time is printed
like this: 245.099999999, now only one digit after the decimal point
is shown.
This commit is contained in:
versat 2019-02-28 13:46:40 +01:00
parent c10ddaef4a
commit e64fc279f0
1 changed files with 2 additions and 2 deletions

View File

@ -477,8 +477,8 @@ def timeReport(resultPath):
total_time_factor = 0.0
html += 'Time for all packages (not just the ones listed above):\n'
html += 'Total time: '.ljust(column_widths[0]) + ' ' + \
str(total_time_base).rjust(column_widths[1]) + ' ' + \
str(total_time_head).rjust(column_widths[2]) + ' ' + \
'{:.1f}'.format(total_time_base).rjust(column_widths[1]) + ' ' + \
'{:.1f}'.format(total_time_head).rjust(column_widths[2]) + ' ' + \
'{:.2f}'.format(total_time_factor).rjust(column_widths[3])
html += '\n'