MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _is_ip_address

Function _is_ip_address

pymongo/pyopenssl_context.py:83–88  ·  view source on GitHub ↗
(address: Any)

Source from the content-addressed store, hash-verified

81# For SNI support. According to RFC6066, section 3, IPv4 and IPv6 literals are
82# not permitted for SNI hostname.
83def _is_ip_address(address: Any) -> bool:
84 try:
85 _ip_address(address)
86 return True
87 except (ValueError, UnicodeError):
88 return False
89
90
91# According to the docs for socket.send it can raise

Callers 1

wrap_socketMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected