From d6faf6e70527c7657ce02683d0f8e563cf6038bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Thu, 14 Mar 2024 10:02:20 +0100 Subject: [PATCH] Fixed Plater updater #2 (close #381) --- CB/Wago.py | 6 +++--- CB/__init__.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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'