mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
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
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue