Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle distro 1.7.0's switch from module to package
ansible.module_utils.distro replaces itself with either the distro module, when it exists, or the bundled distro module. If a target doesn't have a system distro module, it will try to load the bundled distro module (ansible.module_utils.distro._distro). This is tricky, because sys.modules['ansible.module_utils.distro'] points to the distro package. ParentEnumerationMethod() walks up the module tree, to get above this misdirection. The change from a module to package in distro 1.7.0 broke ParentEnumerationMethod's heuristics. Hardcode avoiding the module 'ansible.module_utils.distro' as an import starting point. Fixes: mitogen-hq#906
- Loading branch information