Don't crash if there is no plugin directory
This commit is contained in:
parent
084ff6e503
commit
ad51984991
1 changed files with 9 additions and 6 deletions
|
@ -25,9 +25,12 @@ def default_config():
|
|||
return _LOCATION / "config.toml"
|
||||
|
||||
def plugins():
|
||||
if (_LOCATION / "plugins").is_dir():
|
||||
return [
|
||||
path for
|
||||
path in
|
||||
(_LOCATION / "plugins").iterdir()
|
||||
if path.is_file() and path.suffix == ".py"
|
||||
]
|
||||
else:
|
||||
return []
|
||||
|
|
Loading…
Reference in a new issue