From e1a29266b29455cfd9bb6be207aba5abbd177b37 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Thu, 17 Aug 2023 00:24:24 +0900 Subject: [PATCH] return empty list if extensions_dir not exist --- modules/launch_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 444f16fa..7e4d5a61 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -246,7 +246,7 @@ def list_extensions(settings_file): disabled_extensions = set(settings.get('disabled_extensions', [])) disable_all_extensions = settings.get('disable_all_extensions', 'none') - if disable_all_extensions != 'none' or args.disable_extra_extensions or args.disable_all_extensions: + if disable_all_extensions != 'none' or args.disable_extra_extensions or args.disable_all_extensions or not os.path.isdir(extensions_dir): return [] return [x for x in os.listdir(extensions_dir) if x not in disabled_extensions]