Skip to content

Commit f0eb0f3

Browse files
author
Jacques Fournier
committed
feat: address comments
1 parent 4df1dc8 commit f0eb0f3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

twine/commands/upload.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,17 @@ def skip_upload(
6262
# PyPI / TestPyPI / GCP Artifact Registry
6363
or (status == 400 and any("already exist" in x for x in [reason, text]))
6464
# Nexus Repository OSS (https://www.sonatype.com/nexus-repository-oss)
65-
or (status == 400 and any("updating asset" in x for x in [reason, text]))
65+
or (
66+
status == 400
67+
and (
68+
any("updating asset" in x for x in [reason, text])
69+
or ("cannot be updated" in text)
70+
)
71+
)
6672
# Artifactory (https://jfrog.com/artifactory/)
6773
or (status == 403 and "overwrite artifact" in text)
6874
# Gitlab Enterprise Edition (https://about.gitlab.com)
6975
or (status == 400 and "already been taken" in text)
70-
# Sonatype Nexus Repository
71-
# (https://help.sonatype.com/en/pypi-repositories.html)
72-
or (status == 400 and "cannot be updated" in text)
7376
)
7477

7578

0 commit comments

Comments
 (0)