8000 fix(pypi): Only show index_url_overrides warnings when they are neede… · bazel-contrib/rules_python@cb1c382 · GitHub
[go: up one dir, main page]

Skip to content

Commit cb1c382

Browse files
authored
fix(pypi): Only show index_url_overrides warnings when they are needed (#2967)
Fixes #2966
1 parent 013acd9 commit cb1c382

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

python/private/pypi/simpleapi_download.bzl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,11 @@ def simpleapi_download(
148148
if found_on_index[pkg] != attr.index_url
149149
}
150150

151-
# buildifier: disable=print
152-
print("You can use the following `index_url_overrides` to avoid the 404 warnings:\n{}".format(
153-
render.dict(index_url_overrides),
154-
))
151+
if index_url_overrides:
152+
# buildifier: disable=print
153+
print("You can use the following `index_url_overrides` to avoid the 404 warnings:\n{}".format(
154+
render.dict(index_url_overrides),
155+
))
155156

156157
return contents
157158

0 commit comments

Comments
 (0)
0