From patchwork Tue May 17 14:33:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 15928 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 2A723C3256 for ; Tue, 17 May 2022 14:33:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D500365666; Tue, 17 May 2022 16:33:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652798037; bh=YTNuPtMuA18Tsx5/GaoNG9fs4gImrS8u3Jjoehg356M=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tAu86gNoHb9IehrSf1Ktc0FrHezA38qVy2kGpaYOyDHDC0Qv8CWIOnx3aWuvSyJP+ ljM+rqq5bUKNfr7elE0h1eoLvQD+7N9jk2dinaKfjWITdcCdRRWW01WXzlokouI8S/ ZiUkkoAaO+ObmJ5qXYgPTOpWgFoU9HGgfLpO1F6kkgxStU3av0mC5XLRQRbffsFcCm p6ApXGigHmAi5ClpeKkWbAGGxxXLl4trHFONL9n07/ohH56Yq7py+VO6afZc1ncBi3 H4P8rM6cysTWGaMZnZAExwXXnRi/aZnyDYOMQq/xIq7QuQUxM2N2yKhMNs4+ZKw0Pp 5uUoC6M3GewkQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B07A06041E for ; Tue, 17 May 2022 16:33:53 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SXsV+pL6"; dkim-atps=neutral Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0ECDFD41; Tue, 17 May 2022 16:33:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652798033; bh=YTNuPtMuA18Tsx5/GaoNG9fs4gImrS8u3Jjoehg356M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SXsV+pL6I0tGF/F6Ay+4Kt2RVZ9X0wrOzM8GqRl5GJLqUrF2bPxcbLggeVwxRBaie So+YsewEgyY6BIKCA6J/0cZzHy5+si9XlnYTSb4sxlvgDxUE/9i90OMiHn1BpUsSwa PS9bb3kuPavXnHD0qlS/KlKzvN/xYmIpULareOIM= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Tue, 17 May 2022 17:33:16 +0300 Message-Id: <20220517143325.71784-5-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220517143325.71784-1-tomi.valkeinen@ideasonboard.com> References: <20220517143325.71784-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 04/13] py: unittests: fix selector fd use X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- test/py/unittests.py | 4 ++-- 1 file 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()