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

Skip to content
< 8000 header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark>

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cb1c382

Browse files
authored
fix(pypi): Only show index_url_overrides warnings when they are needed (bazel-contrib#2967)
Fixes bazel-contrib#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