Gitlab Community Edition Instance

Commit befdc40a authored by xrotwang's avatar xrotwang
Browse files

py3.5 compatibility

`pkgutil.iter_modules` yielding `namedtuple`s `ModuleInfo` is new
in 3.6. On 3.5 it yields simple tuples.
parent 4808ed7b
......@@ -40,11 +40,10 @@ def _autodiscover_commands():
"""
import pkgutil
import pycdstar3.cli.commands
for mod in pkgutil.iter_modules(pycdstar3.cli.commands.__path__):
if mod.ispkg:
for _, name, ispkg in pkgutil.iter_modules(pycdstar3.cli.commands.__path__):
if ispkg:
continue
name = mod.name
ipath = pycdstar3.cli.commands.__name__ + "." + mod.name
ipath = pycdstar3.cli.commands.__name__ + "." + name
yield name, importlib.import_module(ipath)
......
......@@ -124,7 +124,7 @@ def test_tx2(mockserver):
with pytest.raises(RuntimeError):
with mockserver:
pass
pass # pragma: no cover
def test_error(mockserver):
......
Supports Markdown
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