From patchwork Mon May 16 14:10:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 15910 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 3CAF0C326C for ; Mon, 16 May 2022 14:10:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8FF796566B; Mon, 16 May 2022 16:10:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652710255; bh=o2UDMjgVn8X2IEOwsdsfRezjLPYp3RRR5wcuF29R+tQ=; 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=EjShfc5ppFmJbnKThM4ndl7h1WgSJG80fBg6Hj6r4djEZeqts/743CmaguEtSHPCw +9qOLjBcWAO/teJl/3fsF25lUMhgrh0PgL9G+8Ssiz/UV51G9ti6rxkOTjERPF7sm/ 3U6J5MKSQ+hHYMTV7t2zXuHIRDAZlKHUIqbBRA37Y87Lt0FdsXrvtv6abzxgLJ+QYO oPudYsjP6C17SjxIjaRismqzOw6tDCnGRoBUjg5Q/zZuBz7+AqckHs0pxr7jgBaYme n36U9vh3+HzfTbN6GJNqpiJ6ZtWfhLPiOhHWCyQNkp13Tza5R2IhAIwQTI929UfLaq /mRPTj82j3nQg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C6E3B61FB8 for ; Mon, 16 May 2022 16:10:49 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="QrNIjQ7+"; 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 3A1F659D; Mon, 16 May 2022 16:10:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652710249; bh=o2UDMjgVn8X2IEOwsdsfRezjLPYp3RRR5wcuF29R+tQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QrNIjQ7+QEiCsCWspbKL44ZXl53XE0Qo8YbLQ/N6qxvVZqWLZSpxKFf1VfeepEViG 2nhpdXWrtajkbV4LdD7M8pRT40GjYqtg7vNruHGgfdxDcNUI4r72CErVoGw1afgQ38 I0YFyBWjBcgSf76d47qDSWBgC1197vVJUFyILaHo= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Mon, 16 May 2022 17:10:12 +0300 Message-Id: <20220516141022.96327-5-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220516141022.96327-1-tomi.valkeinen@ideasonboard.com> References: <20220516141022.96327-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 04/14] 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 --- 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()