Merge pull request #6140 from ynput/enhancement/add-addons-dir-only-if-exists

Chore: Add addons dir only if exists
This commit is contained in:
Jakub Trllo 2024-01-17 14:47:46 +01:00 committed by GitHub
commit 8454269b6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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)