diff --git a/ansible_mitogen/runner.py b/ansible_mitogen/runner.py index 30c36be7..a8dae8b1 100644 --- a/ansible_mitogen/runner.py +++ b/ansible_mitogen/runner.py @@ -760,7 +760,12 @@ class NewStyleRunner(ScriptRunner): for fullname, _, _ in self.module_map['custom']: mitogen.core.import_module(fullname) for fullname in self.module_map['builtin']: - mitogen.core.import_module(fullname) + try: + mitogen.core.import_module(fullname) + except ImportError: + # TODO: this is a huge hack to work around issue #590. + if fullname != 'ansible.module_utils.distro._distro': + raise def _setup_excepthook(self): """