From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 52759158020 for ; Sun, 25 Dec 2022 18:30:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8BEE9E08A8; Sun, 25 Dec 2022 18:30:53 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 715FBE08A8 for ; Sun, 25 Dec 2022 18:30:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7FDCA33FE2A for ; Sun, 25 Dec 2022 18:30:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DADAC6F2 for ; Sun, 25 Dec 2022 18:30:50 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1671993016.fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/snakeoil:master commit in: src/snakeoil/osutils/ X-VCS-Repository: proj/pkgcore/snakeoil X-VCS-Files: src/snakeoil/osutils/native_readdir.py X-VCS-Directories: src/snakeoil/osutils/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8 X-VCS-Branch: master Date: Sun, 25 Dec 2022 18:30:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e8e99146-f0df-40ea-81aa-b931f825bea4 X-Archives-Hash: fcf720b8cff85fffbefb5bdda46a492b commit: fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8 Author: Arthur Zamarin gentoo org> AuthorDate: Sun Dec 25 18:30:16 2022 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Sun Dec 25 18:30:16 2022 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/snakeoil.git/commit/?id=fff34f3c fix after removal of osutils.native_readdir.listdir Follows: 2e4f73760dcbf1fb15bea4c6a89e4a65012ef74d Signed-off-by: Arthur Zamarin gentoo.org> src/snakeoil/osutils/native_readdir.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/snakeoil/osutils/native_readdir.py b/src/snakeoil/osutils/native_readdir.py index d7c2fd91..6600a719 100644 --- a/src/snakeoil/osutils/native_readdir.py +++ b/src/snakeoil/osutils/native_readdir.py @@ -99,8 +99,7 @@ def readdir(path): :param path: path of a directory to scan :return: list of (filename, filetype) """ - pjf = pjoin - things = listdir(path) - lstat = os.lstat - dt = d_type_mapping - return [(name, dt[S_IFMT(lstat(pjf(path, name)).st_mode)]) for name in things] + return [ + (name, d_type_mapping[S_IFMT(os.lstat(pjoin(path, name)).st_mode)]) + for name in os.listdir(path) + ]