Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit b5e70fe

Browse files
committed
New TLSUpgrade exception.
1 parent dbc7bda commit b5e70fe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hyper/common/exceptions.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,12 @@ class ConnectionResetError(Exception):
4242
"""
4343
A HTTP connection was unexpectedly reset.
4444
"""
45+
46+
class TLSUpgrade(Exception):
47+
"""
48+
We upgraded to a new protocol in the NPN/ALPN handshake.
49+
"""
50+
def __init__(self, negotiated, sock):
51+
super(TLSUpgrade, self).__init__()
52+
self.negotiated = negotiated
53+
self.sock = sock

0 commit comments

Comments
 (0)