summaryrefslogtreecommitdiffstats
path: root/Lib/ssl.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 18730cb..ab7a49b 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -126,10 +126,10 @@ from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN, HAS_ALPN
from _ssl import _OPENSSL_API_VERSION
-_SSLMethod = _IntEnum('_SSLMethod',
- {name: value for name, value in vars(_ssl).items()
- if name.startswith('PROTOCOL_')})
-globals().update(_SSLMethod.__members__)
+_IntEnum._convert(
+ '_SSLMethod', __name__,
+ lambda name: name.startswith('PROTOCOL_'),
+ source=_ssl)
_PROTOCOL_NAMES = {value: name for name, value in _SSLMethod.__members__.items()}