python3 updates

This commit is contained in:
Michel Oosterhof
2016-08-16 12:35:42 +00:00
parent 4a307e0c38
commit 63d31aaee5
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ def formatCef(logentry):
# 'out' 'outcome' request, rt # 'out' 'outcome' request, rt
cefList = [] cefList = []
for key in cefExtensions.keys(): for key in list(cefExtensions.keys()):
value = str(cefExtensions[key]).replace(' ', r'\ ') value = str(cefExtensions[key]).replace(' ', r'\ ')
cefList.append(key+"="+value) cefList.append(key+"="+value)
cefExtension = ' '.join(cefList) cefExtension = ' '.join(cefList)

View File

@ -10,7 +10,7 @@ def durationHuman(seconds):
""" """
Turn number of seconds into human readable string Turn number of seconds into human readable string
""" """
seconds = long(round(seconds)) seconds = int(round(seconds))
minutes, seconds = divmod(seconds, 60) minutes, seconds = divmod(seconds, 60)
hours, minutes = divmod(minutes, 60) hours, minutes = divmod(minutes, 60)
days, hours = divmod(hours, 24) days, hours = divmod(hours, 24)