Commit 61eee5ca authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño Committed by Arnaud Fontaine

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 88ac0a43
...@@ -136,7 +136,7 @@ class RESTAPIClientConnectorMixin(XMLObject): ...@@ -136,7 +136,7 @@ class RESTAPIClientConnectorMixin(XMLObject):
http_response = http_connection.getresponse() http_response = http_connection.getresponse()
request_stop_time = time.time() request_stop_time = time.time()
except ssl.SSLError as exc: 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)" %( LOG(__name__, ERROR, "Call to %s %s raised Timeout (%ss)" %(
method, path, round(time_left_before_timeout, 6) method, path, round(time_left_before_timeout, 6)
), error=True) ), 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