Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from geventhttpclient.connectionpool import SSLConnectionPool
self._connection_pool = SSLConnectionPool(
connection_host, connection_port, size=concurrency,
ssl_options=ssl_options,
ssl_context_factory=ssl_context_factory,
insecure=insecure,
network_timeout=network_timeout,
connection_timeout=connection_timeout,
disable_ipv6=disable_ipv6)
else:
self.ssl = False
if not self.port:
self.port = 80
if not connection_port:
connection_port = self.port
self._connection_pool = ConnectionPool(
connection_host, connection_port,
size=concurrency,
network_timeout=network_timeout,
connection_timeout=connection_timeout,
disable_ipv6=disable_ipv6)
self.version = version
self.headers_type = headers_type
self.default_headers = headers_type()
self.default_headers.update(self.DEFAULT_HEADERS)
self.default_headers.update(headers)
self.block_size = block_size
self._base_url_string = str(self.get_base_url())