Don't try to run non-python files

This commit is contained in:
Christian Mäder 2020-06-02 13:37:57 +02:00
parent 03b36058cd
commit ccad15ecf7
1 changed files with 7 additions and 1 deletions

View File

@ -11,7 +11,13 @@ def filename(f):
with scandir(dirname(abspath(__file__))) as it: with scandir(dirname(abspath(__file__))) as it:
for f in sorted(it, key = filename): for f in sorted(it, key = filename):
if f.name.startswith('__') or not f.is_file(): if not f.is_file():
continue
if f.name.startswith('__'):
continue
if not f.name.endswith('.py'):
continue continue
print(f"▶️ Running the startup script {f.path}") print(f"▶️ Running the startup script {f.path}")