Skip to content

Commit 04ab840

Browse files
committed
Fix up some formatting nits
1 parent 43ee389 commit 04ab840

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

couchdb/http.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -217,24 +217,23 @@ def __init__(self, cache=None, timeout=None, max_redirects=5,
217217
self.cache = cache
218218
self.max_redirects = max_redirects
219219
self.perm_redirects = {}
220+
220221
self._disable_ssl_verification = False
221222
self._timeout = timeout
222223
self.connection_pool = ConnectionPool(
223224
self._timeout,
224225
disable_ssl_verification=self._disable_ssl_verification)
226+
225227
self.retry_delays = list(retry_delays) # We don't want this changing on us.
226228
self.retryable_errors = set(retryable_errors)
227229

228230
def disable_ssl_verification(self):
229-
"""
230-
Disable verification of SSL certificates and re-initialize the ConnectionPool.
231-
Only applicable on Python 2.7.9+ as previous versions of Python don't verify
232-
SSL certs.
233-
234-
:return:
235-
"""
231+
"""Disable verification of SSL certificates and re-initialize the
232+
ConnectionPool. Only applicable on Python 2.7.9+ as previous versions
233+
of Python don't verify SSL certs."""
236234
self._disable_ssl_verification = True
237-
self.connection_pool = ConnectionPool(self._timeout, disable_ssl_verification=self._disable_ssl_verification)
235+
self.connection_pool = ConnectionPool(self._timeout,
236+
disable_ssl_verification=self._disable_ssl_verification)
238237

239238
def request(self, method, url, body=None, headers=None, credentials=None,
240239
num_redirects=0):
@@ -437,12 +436,10 @@ def _clean(self):
437436

438437

439438
class InsecureHTTPSConnection(HTTPSConnection):
440-
""" Wrapper class to create an HTTPSConnection without SSl verification (the default behavior in
441-
Python < 2.7.9).
442-
443-
See: https://docs.python.org/2/library/httplib.html#httplib.HTTPSConnection
444-
"""
445-
if sys.version_info >= (2,7,9):
439+
"""Wrapper class to create an HTTPSConnection without SSL verification
440+
(the default behavior in Python < 2.7.9). See:
441+
https://docs.python.org/2/library/httplib.html#httplib.HTTPSConnection"""
442+
if sys.version_info >= (2, 7, 9):
446443
def __init__(self, *a, **k):
447444
k['context'] = ssl._create_unverified_context()
448445
HTTPSConnection.__init__(self, *a, **k)

0 commit comments

Comments
 (0)