From 3f3c4c310846b94b98210381ae6778eddc8508c9 Mon Sep 17 00:00:00 2001 From: Thomas Lauf Date: Sat, 28 Dec 2019 18:52:19 +0100 Subject: [PATCH] Switch to python 3 - #259 Signed-off-by: Thomas Lauf --- ext/totals.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/totals.py b/ext/totals.py index 2b0afd81..3be8767e 100755 --- a/ext/totals.py +++ b/ext/totals.py @@ -25,10 +25,10 @@ # ############################################################################### -from __future__ import print_function -import sys -import json import datetime +import json +import sys + from dateutil import tz DATEFORMAT = "%Y%m%dT%H%M%SZ" @@ -40,8 +40,8 @@ def format_seconds(seconds): Convert seconds: 3661 To formatted: " 1:01:01" """ - hours = int(seconds / 3600) - minutes = int(seconds % 3600 / 60) + hours = seconds // 3600 + minutes = seconds % 3600 // 60 seconds = seconds % 60 return "{:4d}:{:02d}:{:02d}".format(hours, minutes, seconds)