summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-05-18 16:13:16 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-18 17:52:28 +0300
commit936864755521020618f12f9dfea78265a2e70ba4 (patch)
treee3549a918d9b60e6b63a9138f030174d3c565f9e
parente40fbdf855ce9790191fe7de8d3e7c20b33b79cf (diff)
py: unittests: Fix selector fd use
pyright complains about passing fileobj to os.read. Indeed, the parameter should be an int, but I guess fileobj gets automatically converted. In any case, using the fd is better. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-xtest/py/unittests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/py/unittests.py b/test/py/unittests.py
index cbc00ff3..9326358d 100755
--- a/test/py/unittests.py
+++ b/test/py/unittests.py
@@ -262,8 +262,8 @@ class SimpleCaptureMethods(CameraTesterBase):
running = True
while running:
events = sel.select()
- for key, mask in events:
- os.read(key.fileobj, 8)
+ for key, _ in events:
+ os.read(key.fd, 8)
ready_reqs = cm.get_ready_requests()