mirror of https://github.com/python/cpython
test.pythoninfo no longer requires socket (GH-93191)
test.pythoninfo no longer fails if "import socket" fails: the socket
module is now optional.
(cherry picked from commit 4a31ed8a32
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
a6ee7f99cc
commit
7a5f190c9f
|
@ -543,7 +543,10 @@ def collect_ssl(info_add):
|
|||
|
||||
|
||||
def collect_socket(info_add):
|
||||
import socket
|
||||
try:
|
||||
import socket
|
||||
except ImportError:
|
||||
return
|
||||
|
||||
try:
|
||||
hostname = socket.gethostname()
|
||||
|
|
Loading…
Reference in New Issue