Make sure only actual role files are imported

This commit is contained in:
Vgr E. Barry 2018-04-24 13:25:16 -04:00
parent ecd68d15bf
commit a1f17b6d6a
2 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ search = os.path.join(path, "*.py")
for f in glob.iglob(search):
f = os.path.basename(f)
n, _ = os.path.splitext(f)
if f == "__init__.py":
if f.startswith("_"):
continue
importlib.import_module("." + n, package="roles")