From b2ce5be9d049a73e0adb475156435b854355f234 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Mon, 23 Mar 2015 10:11:13 -0500 Subject: [PATCH] Revert "Minor Patch TypeError thrown" --- AUTHORS.rst | 3 +-- requests/packages/urllib3/connectionpool.py | 10 ++-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 10f48cb5..8a40bd97 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -160,5 +160,4 @@ Patches and Suggestions - Scott Sadler (`@ssadler `_) - Arthur Darcet (`@arthurdarcet `_) - Ulrich Petri (`@ulope `_) -- Muhammad Yasoob Ullah Khalid (`@yasoob `_) -- Josh Brown (`@Montycarlo `_) +- Muhammad Yasoob Ullah Khalid (`@yasoob `_) \ No newline at end of file diff --git a/requests/packages/urllib3/connectionpool.py b/requests/packages/urllib3/connectionpool.py index bc804629..0085345c 100644 --- a/requests/packages/urllib3/connectionpool.py +++ b/requests/packages/urllib3/connectionpool.py @@ -311,14 +311,8 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods): # Catch possible read timeouts thrown as SSL errors. If not the # case, rethrow the original. We need to do this because of: # http://bugs.python.org/issue10272 - # Wrapped in a try/catch because python 2.7 throws TypeError, - # SSLError doesn't override __str__ - try: - if 'timed out' in str(err) or 'did not complete (read)' in str(err): # Python 2.6 - raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value) - except TypeError: - raise err - + if 'timed out' in str(err) or 'did not complete (read)' in str(err): # Python 2.6 + raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value) def _make_request(self, conn, method, url, timeout=_Default, **httplib_request_kw):