🐛 Raise no exception in case of missing wheel metadata

That's normal for plugins that were installed as eggs instead of wheels
and we don't want to raise the error in this case. If we also don't find
egg metadata we'll log a warning anyhow.

Any other exceptions will be raised though.
This commit is contained in:
Gina Häußge committed 2019-02-06 18:36:00 +01:00
1 parent 8425c7b973
commit deee737660
1 file changed
+5 -3
+5 -3
View File
@@ -1658,11 +1658,13 @@ class EntryPointMetadata(pkginfo.Distribution):
for metadata_file in metadata_files:
try:
return self.entry_point.dist.get_metadata(metadata_file)
except Exception:
raise # TODO really ignore this?
except (IOError, OSError):
# file not found, metadata file might be missing, ignore
# IOError: file not found in Py2
# OSError (specifically FileNotFoundError): file not found in Py3
pass
warnings.warn('No package metadata found for package: {}'.format(self.entry_point.module_name))
warnings.warn('No package metadata found for package {}'.format(self.entry_point.module_name))
class Plugin(object):