Skip to content

Commit 1a92995

Browse files
committed
issue #590: include nasty workaround for sys.modules junk
1 parent 167d0ef commit 1a92995

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ansible_mitogen/runner.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,12 @@ def _setup_imports(self):
760760
for fullname, _, _ in self.module_map['custom']:
761761
mitogen.core.import_module(fullname)
762762
for fullname in self.module_map['builtin']:
763-
mitogen.core.import_module(fullname)
763+
try:
764+
mitogen.core.import_module(fullname)
765+
except ImportError:
766+
# TODO: this is a huge hack to work around issue #590.
767+
if fullname != 'ansible.module_utils.distro._distro':
768+
raise
764769

765770
def _setup_excepthook(self):
766771
"""

0 commit comments

Comments
 (0)