only read files with .py extension from the scripts dir

This commit is contained in:
AUTOMATIC 2022-10-17 07:56:08 +03:00
parent 0fd1307671
commit 6f7b7a3dcd

@ -58,6 +58,9 @@ def load_scripts(basedir):
for filename in sorted(os.listdir(basedir)):
path = os.path.join(basedir, filename)
if os.path.splitext(path)[1].lower() != '.py':
continue
if not os.path.isfile(path):
continue