diff --git a/CB/Wago.py b/CB/Wago.py index e163efd..15b5dbf 100644 --- a/CB/Wago.py +++ b/CB/Wago.py @@ -63,7 +63,7 @@ def __init__(self, accountname): def parse_storage_internal(self, data): for script in data: - if script['url']: + if 'url' in script: search = self.urlParser.search(script['url']) if search is not None and search.group(1) and search.group(2) and 'ignoreWagoUpdate' not in script: if 'skipWagoUpdate' in script: @@ -80,8 +80,8 @@ def parse_storage(self): self.parse_storage_internal(data) if data := platerdata['profiles'][profile]['hook_data']: self.parse_storage_internal(data) - if data := platerdata['profiles'][profile]['url']: - search = self.urlParser.search(data) + if 'url' in platerdata['profiles'][profile]: + search = self.urlParser.search(platerdata['profiles'][profile]['url']) if (search is not None and search.group(1) and search.group(2) and 'ignoreWagoUpdate' not in platerdata['profiles'][profile]): if 'skipWagoUpdate' in platerdata['profiles'][profile]: diff --git a/CB/__init__.py b/CB/__init__.py index 9414bf6..4c488ce 100644 --- a/CB/__init__.py +++ b/CB/__init__.py @@ -1,7 +1,7 @@ import requests from rich.terminal_theme import TerminalTheme -__version__ = '4.5.4' +__version__ = '4.5.5' __license__ = 'GPLv3' __copyright__ = '2019-2024, Paweł Jastrzębski ' __docformat__ = 'restructuredtext en'