Skip to content

Commit ae1f721

Browse files
committed
_socket SocketType: only if creating sockets is allowed
1 parent b90a0c6 commit ae1f721

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

graalpython/lib-graalpython/_socket.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ def setdefaulttimeout(timeout):
6161
__default_timeout = timeout
6262

6363

64-
_sock = socket()
65-
SocketType = type(_sock)
66-
del _sock
64+
try:
65+
_sock = socket()
66+
SocketType = type(_sock)
67+
del _sock
68+
except:
69+
pass
70+

0 commit comments

Comments
 (0)