fix one day uptime bug

This commit is contained in:
Christian Stade-Schuldt 2016-04-17 11:36:32 +02:00
parent c776ef25a9
commit 59fba1f701
1 changed files with 2 additions and 2 deletions

View File

@ -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))