Catch other timeout exception in disguise

parent 8c6f6766
......@@ -586,6 +586,8 @@ class ConnectionHelper:
raise socket.error(str(e) + self.error_message_timeout)
raise ssl.SSLError(str(e) + self.ssl_error_message_connect_fail)
except socket.error, e:
if e.message == "timed out":
raise socket.error(str(e) + self.error_message_timeout)
raise socket.error(self.error_message_connect_fail + str(e))
# check self.response.status and raise exception early
if self.response.status == httplib.REQUEST_TIMEOUT:
......
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