MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / _parse_tls_version

Function _parse_tls_version

asyncpg/connect_utils.py:260–270  ·  view source on GitHub ↗
(tls_version)

Source from the content-addressed store, hash-verified

258
259
260def _parse_tls_version(tls_version):
261 if tls_version.startswith('SSL'):
262 raise exceptions.ClientConfigurationError(
263 f"Unsupported TLS version: {tls_version}"
264 )
265 try:
266 return ssl_module.TLSVersion[tls_version.replace('.', '_')]
267 except KeyError:
268 raise exceptions.ClientConfigurationError(
269 f"No such TLS version: {tls_version}"
270 )
271
272
273def _dot_postgresql_path(filename) -> typing.Optional[pathlib.Path]:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected