mirror of https://github.com/python/cpython
test.pythoninfo no longer requires socket (#93191)
test.pythoninfo no longer fails if "import socket" fails: the socket module is now optional.
This commit is contained in:
parent
32b7bcffba
commit
4a31ed8a32
|
@ -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