From a70552534acd86a72e126c760c608b56db8f94e2 2018-02-12 17:43:39 From: Lance Edgar Date: 2018-02-12 17:43:39 Subject: [PATCH] Tweak `util.pretty_hours()` logic per python 3 --- diff --git a/rattail/util.py b/rattail/util.py index 3090958c38d9beee80499b2624ef4eea22f6fe04..a22d0606a4b7f713c061cc771b435166388db4ce 100644 --- a/rattail/util.py +++ b/rattail/util.py @@ -187,7 +187,7 @@ def pretty_hours(hours=None, seconds=None): if hours is None: hours = datetime.timedelta(seconds=seconds) minutes = (hours.days * 1440) + (hours.seconds / 60) - return '{}:{:02d}'.format(minutes // 60, minutes % 60) + return "{}:{:02d}".format(int(minutes // 60), int(minutes % 60)) def pretty_quantity(value, empty_zero=False):