FIX scripts suggestions cause crash on web edit
The directory was assumed to be existing, which is wrong
This commit is contained in:
parent
3b49ae0679
commit
da50bcdb96
1 changed files with 2 additions and 0 deletions
|
@ -41,6 +41,8 @@ def get_suggested_dirs():
|
||||||
|
|
||||||
def get_suggested_scripts():
|
def get_suggested_scripts():
|
||||||
base = get_conf()['SCRIPTS_PATH']
|
base = get_conf()['SCRIPTS_PATH']
|
||||||
|
if not base or not os.path.isdir(base):
|
||||||
|
return []
|
||||||
fnames = [f for f in os.listdir(base)
|
fnames = [f for f in os.listdir(base)
|
||||||
if os.access(os.path.join(base, f), os.R_OK | os.X_OK)]
|
if os.access(os.path.join(base, f), os.R_OK | os.X_OK)]
|
||||||
return fnames
|
return fnames
|
||||||
|
|
Loading…
Reference in a new issue