Commit 290a8cb3 authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño Committed by Jérome Perrin

Fix erp5_web_service tests in Python 2.

The if in this change was not being reached in Python 2, because in
this version the repr includes a comma after the message. I have
chosen instead to do the same that was being done before commit
9f4cf295, but changing `message`
(which does not exist in Python 3) to `args[0]` which can be used in
both Python versions.
parent bc5b03cf
......@@ -135,7 +135,7 @@ class RESTAPIClientConnectorMixin(XMLObject):
http_response = http_connection.getresponse()
request_stop_time = time.time()
except ssl.SSLError as exc:
if "SSLError('The read operation timed out')" == repr(exc):
if 'The read operation timed out' == exc.args[0]:
LOG(__name__, ERROR, "Call to %s %s raised Timeout (%ss)" %(
method, path, round(time_left_before_timeout, 6)
), error=True)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment