kopia lustrzana https://github.com/micropython/micropython-lib
uasyncio: Use builtin uerrno module.
rodzic
7043ee0702
commit
1bf1c74ae5
|
@ -1,4 +1,4 @@
|
||||||
import errno
|
import uerrno
|
||||||
import uselect as select
|
import uselect as select
|
||||||
import usocket as _socket
|
import usocket as _socket
|
||||||
from uasyncio.core import *
|
from uasyncio.core import *
|
||||||
|
@ -48,7 +48,7 @@ class EpollEventLoop(EventLoop):
|
||||||
# and if that succeeds, yield IOWrite may never be called
|
# and if that succeeds, yield IOWrite may never be called
|
||||||
# for that socket, and it will never be added to poller. So,
|
# for that socket, and it will never be added to poller. So,
|
||||||
# ignore such error.
|
# ignore such error.
|
||||||
if e.args[0] != errno.ENOENT:
|
if e.args[0] != uerrno.ENOENT:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def wait(self, delay):
|
def wait(self, delay):
|
||||||
|
@ -183,7 +183,7 @@ def open_connection(host, port):
|
||||||
try:
|
try:
|
||||||
s.connect(addr)
|
s.connect(addr)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.args[0] != errno.EINPROGRESS:
|
if e.args[0] != uerrno.EINPROGRESS:
|
||||||
raise
|
raise
|
||||||
if __debug__:
|
if __debug__:
|
||||||
log.debug("open_connection: After connect")
|
log.debug("open_connection: After connect")
|
||||||
|
|
Ładowanie…
Reference in New Issue