From 59fba1f701a08fbf3783252c24fb69fb3267fa9d Mon Sep 17 00:00:00 2001 From: Christian Stade-Schuldt Date: Sun, 17 Apr 2016 11:36:32 +0200 Subject: [PATCH] fix one day uptime bug --- fritzbox_uptime.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fritzbox_uptime.py b/fritzbox_uptime.py index 525dc0c..d6e2878 100755 --- a/fritzbox_uptime.py +++ b/fritzbox_uptime.py @@ -22,7 +22,7 @@ import sys import fritzbox_helper as fh PAGE = '/system/energy.lua' -pattern = re.compile("(\d+)\s(Tagen|Stunden|Minuten)") +pattern = re.compile("(\d+)\s(Tag|Stunden|Minuten)") def get_uptime(): @@ -37,7 +37,7 @@ def get_uptime(): if matches: hours = 0.0 for m in matches: - if m.group(2) == 'Tagen': + if m.group(2) == 'Tag': hours += 24 * int(m.group(1)) if m.group(2) == "Stunden": hours += int(m.group(1))