Commit 6f7b7a3d authored by AUTOMATIC's avatar AUTOMATIC

only read files with .py extension from the scripts dir

parent 0fd13076
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment