Skip to content

Commit

Permalink
better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbelanger committed May 8, 2024
1 parent 0b58be6 commit 3e39f8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dropbox/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@ def init_poolmanager(self, connections, maxsize, block=False, **_):
)

def pinned_session(pool_maxsize=8, ca_certs=None):
# always verify, use cert bundle if provided

_session = requests.session()

# always verify, use cert bundle if provided
# requests
if ca_certs is not None:
_session.verify = ca_certs
else:
_session.verify = True

# urllib3 within requests
http_adapter = _SSLAdapter(pool_connections=4, pool_maxsize=pool_maxsize, ca_certs=ca_certs)
_session.mount('https://', http_adapter)
return _session
Expand Down

0 comments on commit 3e39f8e

Please sign in to comment.