diff options
author | Thorsten von Eicken <tve@voneicken.com> | 2020-04-02 10:01:16 -0700 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-02-17 11:50:54 +1100 |
commit | 2c1299b0071c2c528cc01e3cde9eb22743820176 (patch) | |
tree | 0679eb4daf9522f30cec65b3d7bce494029482b9 /tests/net_hosted/accept_timeout.py | |
parent | 2eed9780ba7074de9e464a2bc771ad14f0332a6c (diff) | |
download | micropython-2c1299b0071c2c528cc01e3cde9eb22743820176.tar.gz micropython-2c1299b0071c2c528cc01e3cde9eb22743820176.zip |
extmod/modussl: Fix ussl read/recv/send/write errors when non-blocking.
Also fix related problems with socket on esp32, improve docs for
wrap_socket, and add more tests.
Diffstat (limited to 'tests/net_hosted/accept_timeout.py')
-rw-r--r-- | tests/net_hosted/accept_timeout.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/net_hosted/accept_timeout.py b/tests/net_hosted/accept_timeout.py index ff989110ae..5f528d557d 100644 --- a/tests/net_hosted/accept_timeout.py +++ b/tests/net_hosted/accept_timeout.py @@ -1,9 +1,9 @@ # test that socket.accept() on a socket with timeout raises ETIMEDOUT try: - import usocket as socket + import uerrno as errno, usocket as socket except: - import socket + import errno, socket try: socket.socket.settimeout @@ -18,5 +18,5 @@ s.listen(1) try: s.accept() except OSError as er: - print(er.args[0] in (110, "timed out")) # 110 is ETIMEDOUT; CPython uses a string + print(er.args[0] in (errno.ETIMEDOUT, "timed out")) # CPython uses a string instead of errno s.close() |