From 210ce547a42ca559592efaef069648ddfe0d2945 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 27 May 2022 17:44:23 +0300 Subject: py: Add CameraManager.read_event() Add CameraManager.read_event() so that the user does not need to call os.read(). We use eventfd, and we must always read 8 bytes. Hiding that inside read_event() makes sense. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- test/py/unittests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test') diff --git a/test/py/unittests.py b/test/py/unittests.py index 7dede33b..8c445bc9 100755 --- a/test/py/unittests.py +++ b/test/py/unittests.py @@ -7,7 +7,6 @@ from collections import defaultdict import errno import gc import libcamera as libcam -import os import selectors import time import typing @@ -278,7 +277,7 @@ class SimpleCaptureMethods(CameraTesterBase): while running: events = sel.select() for key, _ in events: - os.read(key.fd, 8) + cm.read_event() ready_reqs = cm.get_ready_requests() -- cgit v1.2.1