summaryrefslogtreecommitdiff
path: root/Lib/ssl.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 4afa46e5da..61bd775f75 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -658,12 +658,12 @@ class SSLContext(_SSLContext):
def inner(conn, direction, version, content_type, msg_type, data):
try:
version = TLSVersion(version)
- except TypeError:
+ except ValueError:
pass
try:
content_type = _TLSContentType(content_type)
- except TypeError:
+ except ValueError:
pass
if content_type == _TLSContentType.HEADER:
@@ -674,7 +674,7 @@ class SSLContext(_SSLContext):
msg_enum = _TLSMessageType
try:
msg_type = msg_enum(msg_type)
- except TypeError:
+ except ValueError:
pass
return callback(conn, direction, version,