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')
```
pull/933/head
Alex Willmer 3 years ago
parent e8ad12e881
commit ad4b686836

@ -536,7 +536,7 @@ class PkgutilMethod(FinderMethod):
try: try:
path = loader.get_filename(fullname) path = loader.get_filename(fullname)
except (AttributeError, ImportError): except (AttributeError, ImportError, ValueError):
# - get_filename() may throw ImportError if pkgutil.find_loader() # - get_filename() may throw ImportError if pkgutil.find_loader()
# picks a "parent" package's loader for some crap that's been # picks a "parent" package's loader for some crap that's been
# stuffed in sys.modules, for example in the case of urllib3: # stuffed in sys.modules, for example in the case of urllib3:

Loading…
Cancel
Save