added automatic imports for report package

This commit is contained in:
daniel_sagi
2018-07-19 14:52:58 +03:00
parent 174d93804c
commit 0569b99f30
2 changed files with 8 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ except:
if config.log.lower() != "none":
logging.basicConfig(level=loglevel, format='%(message)s', datefmt='%H:%M:%S')
from report import default
import report
from src.core.events import handler
from src.core.events.types import HuntFinished, HuntStarted

View File

@@ -0,0 +1,7 @@
from os.path import dirname, basename, isfile
import glob
# dynamically importing all modules in folder
files = glob.glob(dirname(__file__)+"/*.py")
for module_name in (basename(f)[:-3] for f in files if isfile(f) and not f.endswith('__init__.py')):
exec('from {} import *'.format(module_name))