changeset 01ecfdfbefbc in modules/stock_package_shipping_ups:6.0 details: https://hg.tryton.org/modules/stock_package_shipping_ups?cmd=changeset&node=01ecfdfbefbc description: Use proper exception attribute to get error message
issue10468 review359681002 (grafted from affd508997d028ff24e53a7b3ccdcd4eb13f7d87) diffstat: stock.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (19 lines): diff -r 60c6b6939132 -r 01ecfdfbefbc stock.py --- a/stock.py Mon May 03 16:11:40 2021 +0200 +++ b/stock.py Sun Jun 06 09:35:06 2021 +0200 @@ -184,13 +184,13 @@ try: req = requests.post(api_url, json=shipment_request) except ssl.SSLError as e: - error_message = e.message + error_message = e.reason nb_tries += 1 continue req.raise_for_status() response = req.json() except requests.HTTPError as e: - error_message = e.message + error_message = e.args[0] if error_message: raise UPSError(