Skip to content

Commit 7f93b32

Browse files
authored
Merge pull request #307 from netbox-community/FixFileMatching
Don't try to run non-python files
2 parents 03b3605 + ccad15e commit 7f93b32

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

startup_scripts/__main__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ def filename(f):
1111

1212
with scandir(dirname(abspath(__file__))) as it:
1313
for f in sorted(it, key = filename):
14-
if f.name.startswith('__') or not f.is_file():
14+
if not f.is_file():
15+
continue
16+
17+
if f.name.startswith('__'):
18+
continue
19+
20+
if not f.name.endswith('.py'):
1521
continue
1622

1723
print(f"▶️ Running the startup script {f.path}")

0 commit comments

Comments
 (0)