We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d5919d commit f29be36Copy full SHA for f29be36
uasyncio/uasyncio/__init__.py
@@ -60,14 +60,17 @@ def wait(self, delay):
60
else:
61
res = self.poller.poll(delay, 1)
62
#log.debug("epoll result: %s", res)
63
- for fd, ev in res:
64
- cb = self.objmap[fd]
65
- if __debug__:
66
- log.debug("Calling IO callback: %r", cb)
67
- if isinstance(cb, tuple):
68
- cb[0](*cb[1])
69
- else:
70
- self.call_soon(cb)
+ # Remove "if res" workaround after
+ # https://github.com/micropython/micropython/issues/2716 fixed.
+ if res:
+ for fd, ev in res:
+ cb = self.objmap[fd]
+ if __debug__:
+ log.debug("Calling IO callback: %r", cb)
+ if isinstance(cb, tuple):
71
+ cb[0](*cb[1])
72
+ else:
73
+ self.call_soon(cb)
74
75
76
class StreamReader:
0 commit comments