Skip to content

Commit 1bf1c74

Browse files
committed
uasyncio: Use builtin uerrno module.
1 parent 7043ee0 commit 1bf1c74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

uasyncio/uasyncio/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import errno
1+
import uerrno
22
import uselect as select
33
import usocket as _socket
44
from uasyncio.core import *
@@ -48,7 +48,7 @@ def remove_writer(self, sock):
4848
# and if that succeeds, yield IOWrite may never be called
4949
# for that socket, and it will never be added to poller. So,
5050
# ignore such error.
51-
if e.args[0] != errno.ENOENT:
51+
if e.args[0] != uerrno.ENOENT:
5252
raise
5353

5454
def wait(self, delay):
@@ -183,7 +183,7 @@ def open_connection(host, port):
183183
try:
184184
s.connect(addr)
185185
except OSError as e:
186-
if e.args[0] != errno.EINPROGRESS:
186+
if e.args[0] != uerrno.EINPROGRESS:
187187
raise
188188
if __debug__:
189189
log.debug("open_connection: After connect")

0 commit comments

Comments
 (0)