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"
|
return _LOCATION / "config.toml"
|
||||||
|
|
||||||
def plugins():
|
def plugins():
|
||||||
return [
|
if (_LOCATION / "plugins").is_dir():
|
||||||
path for
|
return [
|
||||||
path in
|
path for
|
||||||
(_LOCATION / "plugins").iterdir()
|
path in
|
||||||
if path.is_file() and path.suffix == ".py"
|
(_LOCATION / "plugins").iterdir()
|
||||||
]
|
if path.is_file() and path.suffix == ".py"
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return []
|
||||||
|
|
Loading…
Reference in a new issue