Skip to content

Commit

Permalink
upload: be more principled in URL check
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <william@yossarian.net>
  • Loading branch information
woodruffw committed Aug 27, 2023
1 parent 1e79d7c commit 491910a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions twine/commands/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ def upload(upload_settings: settings.Settings, dists: List[str]) -> None:
# or TestPyPI, which will (as of May 2023) ignore it.
# This check is currently limited to just those indices, since other
# indices may still support PGP signatures.
if (
any(p.gpg_signature for p in packages_to_upload)
and "pypi.org" in repository_url
if any(p.gpg_signature for p in packages_to_upload) and repository_url.startswith(
(utils.DEFAULT_REPOSITORY, utils.TEST_REPOSITORY)
):
logger.warning(
"One or more packages has an associated PGP signature; "
Expand Down

0 comments on commit 491910a

Please sign in to comment.