add addons dir only if exists

This commit is contained in:
Jakub Trllo 2024-01-16 16:48:35 +01:00
parent 4c9b19ed99
commit b29dee59fa

View file

@ -542,7 +542,8 @@ def _load_modules():
module_dirs.insert(0, current_dir)
addons_dir = os.path.join(os.path.dirname(current_dir), "addons")
module_dirs.append(addons_dir)
if os.path.exists(addons_dir):
module_dirs.append(addons_dir)
ignored_host_names = set(IGNORED_HOSTS_IN_AYON)
ignored_current_dir_filenames = set(IGNORED_DEFAULT_FILENAMES)