From f1963f881465ce4c9ecad92f4ca68cf9e633695a Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 11 Feb 2016 02:10:36 -0600 Subject: [PATCH] Fix name shadowing. --- tif/calc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tif/calc.py b/tif/calc.py index 5b0190f..a2ead15 100644 --- a/tif/calc.py +++ b/tif/calc.py @@ -108,12 +108,12 @@ def _format_time(cache_time): diff = datetime.utcnow() - cache_time total_seconds = diff.days * 86400 + diff.seconds if total_seconds > 86400: - return format(diff.seconds / 86400, "day") + return formatter(total_seconds / 86400, "day") if total_seconds > 3600: - return format(diff.seconds / 3600, "hour") + return formatter(total_seconds / 3600, "hour") if total_seconds > 60: - return format(diff.seconds / 60, "minute") - return format(total_seconds, "second") + return formatter(total_seconds / 60, "minute") + return formatter(total_seconds, "second") def _get_protection(page): edit = [prot for prot in page.protection if prot["type"] == "edit"]