Skip to content

Commit

Permalink
Fixes #2169 Add handling for blank secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Aug 12, 2024
1 parent 997fca0 commit ff80a8d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
10 changes: 5 additions & 5 deletions modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down

0 comments on commit ff80a8d

Please sign in to comment.