Skip to content

Commit ad4b686

Browse files
committed
master.PkgutilMethod: Skip module loaders that raise ValueError
e.g. in Ansible 6, ansible-core 2.13 ``` [mux 2717] 23:39:11.342416 D mitogen: PkgutilMethod(): _AnsibleCollectionLoader(path=None).get_file_name('ansible.plugins') failed: ValueError('_AnsibleCollectionLoader(path=None) cannot find files for ansible.plugins, only ansible_collections.ansible.builtin.plugins') ```
1 parent e8ad12e commit ad4b686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mitogen/master.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ def find(self, fullname):
536536

537537
try:
538538
path = loader.get_filename(fullname)
539-
except (AttributeError, ImportError):
539+
except (AttributeError, ImportError, ValueError):
540540
# - get_filename() may throw ImportError if pkgutil.find_loader()
541541
# picks a "parent" package's loader for some crap that's been
542542
# stuffed in sys.modules, for example in the case of urllib3:

0 commit comments

Comments
 (0)