From patchwork Wed May 18 13:13: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: 15955 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 B6375C326C for ; Wed, 18 May 2022 13:13:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0283865661; Wed, 18 May 2022 15:13:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652879636; bh=RKi8ohSP2/H4tFlJm6FL57C1QuJSK4DqfYF2nMVFae4=; 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=ZWORPCRNnKvNpRUVlsTMZFCnB4fCC47BwtbQEdeyhL2bfeG3K8GB8PmCbR8yAw0VO p6rQeXVMn6BFZMjzTcgG76YxHehHimwbJgTsGyYCawUJSVRTUIrXCcxhbEPBcVrpuU hk/7CdKKKgGUrhV0xn5LWObHPnm9/KlFb2qfcMhU8abnnw29gYgmwpFMg3ivsYq30a oh1hfGGeRR0sub/V2vLZ8I6FxbF0XeA9w9x7Ab6laQontiYidWbo17oAsaS90EKVSi 2pH9k1pa7k3nSHyQnZw6JHJcpX2edjH5/3M+OCbMSyeLuDDH/cpKzle+9Uc6eSYIyh Sb9tbdbpWZNnA== 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 12F976565B for ; Wed, 18 May 2022 15:13:49 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PRwMVjY/"; 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 634B41C03; Wed, 18 May 2022 15:13:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652879628; bh=RKi8ohSP2/H4tFlJm6FL57C1QuJSK4DqfYF2nMVFae4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PRwMVjY/vmmphkZFBpBPvr4d2hT7X4lzL+GqisixBt44wdRly5TVdI8LzVNOpJhIh NbnKwxyFmO5sJb3rr1JmW1abjQrfa4qRlTxvzf1IAKaOgUBNmvSDfYLJv7k4tsUSKB nVQtIGXk0o7wt6l80lDmRRK+S+rLCJWqNd5zrWPU= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Wed, 18 May 2022 16:13:16 +0300 Message-Id: <20220518131329.66994-6-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220518131329.66994-1-tomi.valkeinen@ideasonboard.com> References: <20220518131329.66994-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 05/18] 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()