Catch req.link = None

req.link is of type InstallRequirements which can be None. Return False (requirement not met) if this is the case.
This commit is contained in:
Fabian Meeßen
2023-09-27 11:45:45 +02:00
committed by GitHub
parent c08ecb2450
commit 7e1b860806
+2
View File
@@ -769,6 +769,8 @@ class Environment:
None,
)
if match is not None:
if req.link is None:
return False
if req.editable and req.link and req.link.is_file:
requested_path = req.link.file_path
if os.path.exists(requested_path):