Skip to content

Commit

Permalink
snactor: Fix missing load_module
Browse files Browse the repository at this point in the history
  • Loading branch information
matejmatuska authored and pirat89 committed Jul 17, 2024
1 parent 70eaaf3 commit 258e943
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion leapp/snactor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pkgutil
import socket

from leapp.compat import load_module
from leapp.utils.i18n import _ # noqa; pylint: disable=redefined-builtin
from leapp.snactor import commands
from leapp.snactor.commands import workflow
Expand Down Expand Up @@ -30,7 +31,7 @@ def _load_commands_from(path):
for importer, name, is_pkg in pkgutil.iter_modules([pkg_path]):
if is_pkg:
continue
mod = importer.find_module(name).load_module(name)
mod = load_module(importer, name)
if hasattr(mod.cli, 'command'):
if not mod.cli.command.parent:
cli.command.add_sub(mod.cli.command)
Expand Down
3 changes: 3 additions & 0 deletions res/container-tests/Containerfile.ubi10
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ ENTRYPOINT virtualenv testenv -p "/usr/bin/$PYTHON_VENV" && \
pip install -U setuptools && \
pip install -U funcsigs && \
pip install -U -r requirements-tests.txt && \
# NOTE(mmatuska): The pytest ver defined in requirements-tests is too old \
# for Python 3.12 (missing imp module), there do an update here until we \
# bump that. Similarly for six. \
pip install -U pytest && \
pip install -U six && \
pip install -U . && \
Expand Down

0 comments on commit 258e943

Please sign in to comment.