From 997d7e889f8dac35559007a51faf3ae635fe6ad7 Mon Sep 17 00:00:00 2001 From: Jay Turner Date: Mon, 7 Oct 2024 11:01:31 +0100 Subject: [PATCH] Fix the assumption that all sources are named reemergence of #5004 --- pipenv/utils/resolver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/utils/resolver.py b/pipenv/utils/resolver.py index 4054ebdc76..3991af90c7 100644 --- a/pipenv/utils/resolver.py +++ b/pipenv/utils/resolver.py @@ -962,6 +962,6 @@ def resolve_deps( @lru_cache def get_pipenv_sitedir() -> Optional[str]: for dist in importlib_metadata.distributions(): - if dist.metadata["Name"].lower() == "pipenv": + if dist.metadata.get("Name","").lower() == "pipenv": return str(dist.locate_file("")) return None