mirror of
https://github.com/searxng/searxng.git
synced 2024-11-27 05:11:03 +00:00
Fix pep8
This commit is contained in:
parent
f18a3a77ef
commit
3f395304f9
1 changed files with 3 additions and 3 deletions
|
@ -41,14 +41,14 @@ class HTTPAdapterWithConnParams(requests.adapters.HTTPAdapter):
|
||||||
block=self._pool_block, **self._conn_params)
|
block=self._pool_block, **self._conn_params)
|
||||||
|
|
||||||
|
|
||||||
connect=settings['outgoing'].get('pool_connections', 100) # Magic number kept from previous code
|
connect = settings['outgoing'].get('pool_connections', 100) # Magic number kept from previous code
|
||||||
maxsize=settings['outgoing'].get('pool_maxsize', requests.adapters.DEFAULT_POOLSIZE) # Picked from constructor
|
maxsize = settings['outgoing'].get('pool_maxsize', requests.adapters.DEFAULT_POOLSIZE) # Picked from constructor
|
||||||
if settings['outgoing'].get('source_ips'):
|
if settings['outgoing'].get('source_ips'):
|
||||||
http_adapters = cycle(HTTPAdapterWithConnParams(pool_connections=connect, pool_maxsize=maxsize,
|
http_adapters = cycle(HTTPAdapterWithConnParams(pool_connections=connect, pool_maxsize=maxsize,
|
||||||
source_address=(source_ip, 0))
|
source_address=(source_ip, 0))
|
||||||
for source_ip in settings['outgoing']['source_ips'])
|
for source_ip in settings['outgoing']['source_ips'])
|
||||||
https_adapters = cycle(HTTPAdapterWithConnParams(pool_connections=connect, pool_maxsize=maxsize,
|
https_adapters = cycle(HTTPAdapterWithConnParams(pool_connections=connect, pool_maxsize=maxsize,
|
||||||
source_address=(source_ip, 0))
|
source_address=(source_ip, 0))
|
||||||
for source_ip in settings['outgoing']['source_ips'])
|
for source_ip in settings['outgoing']['source_ips'])
|
||||||
else:
|
else:
|
||||||
http_adapters = cycle((HTTPAdapterWithConnParams(pool_connections=connect, pool_maxsize=maxsize), ))
|
http_adapters = cycle((HTTPAdapterWithConnParams(pool_connections=connect, pool_maxsize=maxsize), ))
|
||||||
|
|
Loading…
Reference in a new issue