From 5043d53e7bd28d44b0f5966a7692a7a19b6362ac Mon Sep 17 00:00:00 2001 From: Aniket21mathur Date: Wed, 17 Jul 2019 12:42:22 +0530 Subject: [PATCH] Typecast into "int" --- src/sugar3/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sugar3/util.py b/src/sugar3/util.py index 31ed3356..a16f88af 100644 --- a/src/sugar3/util.py +++ b/src/sugar3/util.py @@ -267,7 +267,7 @@ def timestamp_to_elapsed_string(timestamp, max_levels=2): elapsed_seconds = int(time.time() - timestamp) for name_singular, name_plural, factor in units: - elapsed_units = elapsed_seconds / factor + elapsed_units = int(elapsed_seconds / factor) if elapsed_units > 0: if levels > 0: