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:
Victor Stinner 2022-05-25 02:11:51 +02:00 committed by GitHub
parent 32b7bcffba
commit 4a31ed8a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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()