瀏覽代碼

openshift_checks: ignore hidden files in checks dir

load_checks: Ignore hidden files when scanning the directory for checks.
Miciah Masters 7 年之前
父節點
當前提交
fac49680cb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      roles/openshift_health_checker/openshift_checks/__init__.py

+ 1 - 1
roles/openshift_health_checker/openshift_checks/__init__.py

@@ -173,7 +173,7 @@ def load_checks(path=None, subpkg=""):
             modules = modules + load_checks(os.path.join(path, name), subpkg + "." + name)
             modules = modules + load_checks(os.path.join(path, name), subpkg + "." + name)
             continue
             continue
 
 
-        if name.endswith(".py") and name not in LOADER_EXCLUDES:
+        if name.endswith(".py") and not name.startswith(".") and name not in LOADER_EXCLUDES:
             modules.append(import_module(__package__ + subpkg + "." + name[:-3]))
             modules.append(import_module(__package__ + subpkg + "." + name[:-3]))
 
 
     return modules
     return modules