aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/net_hosted/connect_nonblock.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/net_hosted/connect_nonblock.py b/tests/net_hosted/connect_nonblock.py
index 3a3eaa2ba..c024b65a0 100644
--- a/tests/net_hosted/connect_nonblock.py
+++ b/tests/net_hosted/connect_nonblock.py
@@ -2,8 +2,9 @@
try:
import usocket as socket
+ import uerrno as errno
except:
- import socket
+ import socket, errno
def test(peer_addr):
@@ -12,7 +13,7 @@ def test(peer_addr):
try:
s.connect(peer_addr)
except OSError as er:
- print(er.args[0] == 115) # 115 is EINPROGRESS
+ print(er.args[0] == errno.EINPROGRESS)
s.close()