From ff80a8de50e3ebd73199e30f35f14af3b5c09020 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 12 Aug 2024 10:50:16 -0400 Subject: [PATCH] Fixes #2169 Add handling for blank secrets --- CHANGELOG | 10 ++++++---- modules/config.py | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2ca7a8bd8..055baa4a3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,10 @@ # Requirements Update (requirements will need to be reinstalled) -Added tenacity requirement at 8.4.2 +Added tenacity requirement at 9.0.0 +Update lxml requirement to 5.3.0 Update pillow requirement to 10.4.0 -Update PlexAPI requirement to 4.15.14 +Update PlexAPI requirement to 4.15.15 Update psutil requirement to 6.0.0 -Update setuptools requirement to 70.2.0 +Update setuptools requirement to 72.1.0 # Removed Features @@ -21,6 +22,7 @@ Fixed multiple anime `int()` Errors Fixed #2100 `verify_ssl` wasn't working when downloading images Fixed an issue with `delete_collections` where items were being deleted if they only matched one criteria vs all criteria Fixed `imdb_watchlist` -Fix #2150; change xmen list to a new one +Fixed #2150; change xmen list to a new one +Fixed #2169 Add handling for blank secrets Various other Minor Fixes diff --git a/modules/config.py b/modules/config.py index a556eaaac..7b800d607 100644 --- a/modules/config.py +++ b/modules/config.py @@ -328,20 +328,20 @@ def hooks(hook_attr): def check_next(next_data): if isinstance(next_data, dict): for d in next_data: - out = check_next(next_data[d]) - if out: - next_data[d] = out + next_data[d] = check_next(next_data[d]) elif isinstance(next_data, list): for d in next_data: check_next(d) + return [check_next(d) for d in next_data] else: for secret, secret_value in self.secrets.items(): for test in [secret, secret.upper().replace("-", "_")]: if f"<<{test}>>" in str(next_data): return str(next_data).replace(f"<<{test}>>", secret_value) + if str(next_data).startswith("<<") and str(next_data).endswith(">>"): + return None return next_data - if self.secrets: - check_next(self.data) + check_next(self.data) def check_for_attribute(data, attribute, parent=None, test_list=None, translations=None, default=None, do_print=True, default_is_none=False, req_default=False, var_type="str", throw=False, save=True, int_min=0, int_max=None): endline = ""