Skip to content

Commit 5c4fd71

Browse files
committed
Fail silently if INSTALLER cannot be read
1 parent d81edc8 commit 5c4fd71

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pip/_internal/metadata/pkg_resources.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ def version(self) -> DistributionVersion:
9999

100100
@property
101101
def installer(self) -> str:
102-
return get_installer(self._dist)
102+
try:
103+
return get_installer(self._dist)
104+
except (OSError, ValueError):
105+
return "" # Fail silently if the installer file cannot be read.
103106

104107
@property
105108
def local(self) -> bool:

0 commit comments

Comments
 (0)