Skip to content

Commit

Permalink
Simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jmwoliver committed Oct 20, 2022
1 parent eec4d5a commit 1d09604
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions twine/commands/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ def upload(upload_settings: settings.Settings, dists: List[str]) -> None:
repository = upload_settings.create_repository()
uploaded_packages = []

# If a user tries to upload signature files with no actual distributions,
# then throw an error.
if len(packages_to_upload) == 0 and len(signatures) > 0:
if signatures and not packages_to_upload:
raise exceptions.InvalidDistribution(
"Cannot upload signed files by themselves, must upload with a "
"corresponding distribution."
Expand Down

0 comments on commit 1d09604

Please sign in to comment.