Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 13, 2024
1 parent d578ae7 commit 0ee1203
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions proxy/http/proxy/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from ...common.utils import tls_interception_enabled
from ...core.connection import TcpServerConnection


if TYPE_CHECKING: # pragma: no cover
from ...common.types import HostPort
from ...core.connection import UpstreamConnectionPool
Expand Down
10 changes: 5 additions & 5 deletions proxy/http/proxy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,23 +793,23 @@ def _wrap_server(
# we will cache such upstream hosts and avoid intercepting them for future
# requests.
logger.warning(
"ssl.SSLCertVerificationError: "
+ "Server raised cert verification error for upstream: {0}".format(
'ssl.SSLCertVerificationError: '
+ 'Server raised cert verification error for upstream: {0}'.format(
upstream.addr[0],
),
)
do_close = True
except ssl.SSLError as e:
if e.reason == 'SSLV3_ALERT_HANDSHAKE_FAILURE':
logger.warning(
"{0}: ".format(e.reason)
+ "Server raised handshake alert failure for upstream: {0}".format(
'{0}: '.format(e.reason)
+ 'Server raised handshake alert failure for upstream: {0}'.format(
upstream.addr[0],
),
)
else:
logger.exception(
"SSLError when wrapping client for upstream: {0}".format(
'SSLError when wrapping client for upstream: {0}'.format(
upstream.addr[0],
),
exc_info=e,
Expand Down
1 change: 0 additions & 1 deletion proxy/plugin/proxy_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from typing import Any, Dict, List, Optional

from proxy.core.connection import TcpServerConnection

from ..http import Url, httpHeaders, httpMethods
from ..core.base import TcpUpstreamConnectionHandler
from ..http.proxy import HttpProxyBasePlugin
Expand Down

0 comments on commit 0ee1203

Please sign in to comment.