diff options
author | a11ax <a11ax@yandex-team.com> | 2023-12-13 00:32:27 +0300 |
---|---|---|
committer | a11ax <a11ax@yandex-team.com> | 2023-12-13 01:22:04 +0300 |
commit | 21c42e9f3e32ac1bf46747a51c73b13e9eea4c1a (patch) | |
tree | 1f6599b2c0b6222a8ac92b74c58e12b829713ce2 /contrib/python/setuptools/py3 | |
parent | a1e5a74cdd2ad797c39df87dd0cf7ae05101d45a (diff) | |
download | ydb-21c42e9f3e32ac1bf46747a51c73b13e9eea4c1a.tar.gz |
feat setuptools: revert/fix UnionProvider
Diffstat (limited to 'contrib/python/setuptools/py3')
-rw-r--r-- | contrib/python/setuptools/py3/pkg_resources/__init__.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/python/setuptools/py3/pkg_resources/__init__.py b/contrib/python/setuptools/py3/pkg_resources/__init__.py index f2dfebb6dd..8f72b67c27 100644 --- a/contrib/python/setuptools/py3/pkg_resources/__init__.py +++ b/contrib/python/setuptools/py3/pkg_resources/__init__.py @@ -3304,11 +3304,7 @@ class UnionProvider(EmptyProvider): return False def _fn(self, base, resource_name): - for p, pp in base: - if p._has(pp): - return p._fn(pp, resource_name) - - raise IOError(resource_name) + return [(p, p._fn(pp, resource_name)) for p, pp in base] def _get(self, path): for p, pp in path: @@ -3334,6 +3330,9 @@ class UnionProvider(EmptyProvider): return False + def get_resource_filename(self, manager, resource_name): + return self._fn(self.module_path, resource_name)[0] + class ResProvider(EmptyProvider): _resource_fs = {} |