ansible-test - Fix plugin loading.

This fixes a traceback when loading plugins that use dataclasses.
pull/76674/head
Matt Clay 4 years ago
parent d2daa67b00
commit 7e814dd4db

@ -0,0 +1,2 @@
bugfixes:
- ansible-test - Fix plugin loading.

@ -770,11 +770,10 @@ def load_module(path, name): # type: (str, str) -> None
spec = importlib.util.spec_from_file_location(name, path)
module = importlib.util.module_from_spec(spec)
sys.modules[name] = module
# noinspection PyUnresolvedReferences
spec.loader.exec_module(module)
sys.modules[name] = module
def sanitize_host_name(name):
"""Return a sanitized version of the given name, suitable for use as a hostname."""

Loading…
Cancel
Save