diff --git a/fritzbox_uptime.py b/fritzbox_uptime.py index 8c013a7..28c9c48 100755 --- a/fritzbox_uptime.py +++ b/fritzbox_uptime.py @@ -19,14 +19,15 @@ import os import re import sys + import fritzbox_helper as fh locale = os.environ.get('locale', 'de') -patternLoc = {"de":"(\d+)\s(Tag|Stunden|Minuten)", \ - "en":"(\d+)\s(days|hours|minutes)"} -dayLoc = {"de":"Tag", "en":"days"} -hourLoc = {"de":"Stunden", "en":"hours"} -minutesLoc = {"de":"Minuten", "en":"minutes"} +patternLoc = {"de": "(\d+)\s(Tag|Stunden|Minuten)", + "en": "(\d+)\s(days|hours|minutes)"} +dayLoc = {"de": "Tag", "en": "days"} +hourLoc = {"de": "Stunden", "en": "hours"} +minutesLoc = {"de": "Minuten", "en": "minutes"} PAGE = '/system/energy.lua' pattern = re.compile(patternLoc[locale]) diff --git a/fritzbox_wifi_devices.py b/fritzbox_wifi_devices.py index f1ffa7c..dd6bce5 100755 --- a/fritzbox_wifi_devices.py +++ b/fritzbox_wifi_devices.py @@ -19,10 +19,11 @@ import os import re import sys + import fritzbox_helper as fh locale = os.environ.get('locale', 'de') -patternLoc = {"de":"(\d+) WLAN", "en":"(\d+) wireless LAN"} +patternLoc = {"de": "(\d+) WLAN", "en": "(\d+) wireless LAN"} PAGE = '/system/energy.lua' pattern = re.compile(patternLoc[locale])