Skip to content

Commit 7eb4977

Browse files
committed
fix: Warn only when all SHAs fail to match a requirement
1 parent cd550d9 commit 7eb4977

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/private/pypi/parse_requirements.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ def _add_dists(*, requirement, index_urls, logger = None):
334334
sdist = maybe_sdist
335335
continue
336336

337-
if logger:
338-
logger.warn(lambda: "Could not find a whl or an sdist with sha256={}".format(sha256))
337+
if logger and (len(whls) == 0 and sdist == None):
338+
logger.warn(lambda: "Could not find a whl or an sdist with sha256={} for requirement={}".format(sha256, requirement))
339339

340340
yanked = {}
341341
for dist in whls + [sdist]:

0 commit comments

Comments
 (0)