From c454e78300453c425ace5e50cb956867ce72ecbe Mon Sep 17 00:00:00 2001 From: AHReccese Date: Mon, 22 Jul 2024 21:47:13 +0330 Subject: [PATCH] replace `error.__str__` with `error.output` --- reserver/reserver_obj.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reserver/reserver_obj.py b/reserver/reserver_obj.py index 08110d0..7fec654 100644 --- a/reserver/reserver_obj.py +++ b/reserver/reserver_obj.py @@ -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)."