diff --git a/src/sshare/config_directory.py b/src/sshare/config_directory.py index 2f84532..cf45ae0 100644 --- a/src/sshare/config_directory.py +++ b/src/sshare/config_directory.py @@ -25,9 +25,12 @@ def default_config(): return _LOCATION / "config.toml" def plugins(): - return [ - path for - path in - (_LOCATION / "plugins").iterdir() - if path.is_file() and path.suffix == ".py" - ] + if (_LOCATION / "plugins").is_dir(): + return [ + path for + path in + (_LOCATION / "plugins").iterdir() + if path.is_file() and path.suffix == ".py" + ] + else: + return []