From 0284aee1a25095fe6a9b7c4f56271eb2ad8480dd Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Wed, 9 Mar 2016 07:39:29 +0100 Subject: [PATCH] Exclude dot files from modules list to be loaded --- bin/misp-modules.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/misp-modules.py b/bin/misp-modules.py index 9f30538..5b8dce8 100644 --- a/bin/misp-modules.py +++ b/bin/misp-modules.py @@ -25,6 +25,7 @@ import tornado.web import importlib import json import logging +import re runPath = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(runPath, '..')) @@ -46,6 +47,8 @@ modules = [] for module in os.listdir(modulesdir): if ".py" not in module or ".pyc" in module: continue + if re.match("^\.", module): + continue modulename = module.split(".")[0] moduletype = os.path.split(modulesdir)[1] modules.append(modulename)