Commit 664bf247 by fwkz

Fixing stripping module extension. Removing redundant test parameter.

parent 79000842
...@@ -6,4 +6,4 @@ install: ...@@ -6,4 +6,4 @@ install:
- "pip install -r requirements.txt" - "pip install -r requirements.txt"
- "pip install pexpect" - "pip install pexpect"
script: "python -m unittest discover -t . -s routersploit/test" script: "python -m unittest discover -s routersploit/test"
\ No newline at end of file \ No newline at end of file
...@@ -186,7 +186,7 @@ class RoutersploitInterpreter(BaseInterpreter): ...@@ -186,7 +186,7 @@ class RoutersploitInterpreter(BaseInterpreter):
for root, dirs, files in os.walk(self.modules_directory): for root, dirs, files in os.walk(self.modules_directory):
_, package, root = root.rpartition('routersploit') _, package, root = root.rpartition('routersploit')
root = "".join((package, root)).replace(os.sep, '.') root = "".join((package, root)).replace(os.sep, '.')
modules = map(lambda x: '.'.join((root, x.strip('.py'))), filter(lambda x: x.endswith('.py'), files)) modules = map(lambda x: '.'.join((root, os.path.splitext(x)[0])), filter(lambda x: x.endswith('.py'), files))
for module_path in modules: for module_path in modules:
try: try:
module = importlib.import_module(module_path) module = importlib.import_module(module_path)
......
...@@ -8,4 +8,4 @@ deps = ...@@ -8,4 +8,4 @@ deps =
pexpect pexpect
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
commands=python -m unittest discover -t . -s routersploit/test commands=python -m unittest discover -s routersploit/test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment