Skip to content

Commit

Permalink
handle package vs module conflict cases
Browse files Browse the repository at this point in the history
  • Loading branch information
AHReccese committed Jul 22, 2024
1 parent c454e78 commit 862aa8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reserver/reserver_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,12 @@ def upload(self, package_name, user_parameters=None):
error = "Invalid or non-existent authentication information(PyPI API Key)."
if "400" in error and "too similar to an existing project" in error:
error = "Given package name is too similar to an existing project in PyPI."
if "400" in error and "isn't allowed." in error:
error = "Given package name has conflict with the module name of a previously taken package (the taken package itself has a different name, but it's module name has conflict)."
if "400" in error and "isn't allowed (conflict with Python Standard Library" in error:
error = "Given package name has conflict with Python Standard Library module name."
break

# todo remove env variable
if "TWINE_USERNAME" in environ:
environ.pop("TWINE_USERNAME")
if "TWINE_PASSWORD" in environ:
Expand Down

0 comments on commit 862aa8a

Please sign in to comment.