Skip to content

Commit fb30af7

Browse files
committed
Use anyio
The GPIO file descriptor is not a socket but that doesn't matter.
1 parent bbf8755 commit fb30af7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

asyncgpio/gpio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from . import libgpiod as gpio
22

33
import sys
4-
import trio
4+
import anyio
55
import datetime
66

77

@@ -275,7 +275,7 @@ async def __anext__(self):
275275
fd = gpio.lib.gpiod_line_event_get_fd(self._line)
276276
if fd < 0:
277277
raise OSError("line is closed")
278-
await trio.lowlevel.wait_readable(fd)
278+
await anyio.wait_socket_readable(fd)
279279
self._is_open()
280280
r = gpio.lib.gpiod_line_event_read_fd(fd, ev)
281281
if r != 0:

0 commit comments

Comments
 (0)