Skip to content

Commit

Permalink
replace error.__str__ with error.output
Browse files Browse the repository at this point in the history
  • Loading branch information
AHReccese committed Jul 22, 2024
1 parent 310367a commit c454e78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion reserver/reserver_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def upload(self, package_name, user_parameters=None):
check_output(command, shell=True)
except CalledProcessError as e:
publish_failed = True
error = e.__str__()
error = e.output
error = error.decode(chardet.detect(error)['encoding'])
if command == commands[-2]:
if "403" in error and "Invalid or non-existent authentication information" in error:
error = "Invalid or non-existent authentication information(PyPI API Key)."
Expand Down

0 comments on commit c454e78

Please sign in to comment.