Skip to content

Commit 1f9f3b6

Browse files
committed
fix: ensure app exists in user_config before disabling extra-apps in main function
1 parent 412134f commit 1f9f3b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/fn_setupApps.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,9 @@ def main(app_config_path: str, m4b_config_path: str, user_config_path: str) -> N
898898
else: # if there are extra-apps enabled disable them
899899
for app in app_config["extra-apps"]:
900900
app_name = app["name"].lower()
901-
user_config["apps"][app_name]["enabled"] = False
901+
# Ensure app exists in user_config before disabling
902+
if app_name in user_config["apps"]:
903+
user_config["apps"][app_name]["enabled"] = False
902904
# Step 4: Set up notifications
903905
setup_notifications(user_config)
904906
# Step 5: Save the user configuration

0 commit comments

Comments
 (0)