From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pkgcore/snakeoil:master commit in: src/snakeoil/osutils/
Date: Sun, 25 Dec 2022 18:30:50 +0000 (UTC) [thread overview]
Message-ID: <1671993016.fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8.arthurzam@gentoo> (raw)
commit: fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 25 18:30:16 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> 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 <arthurzam <AT> 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)
+ ]
reply other threads:[~2022-12-25 18:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1671993016.fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8.arthurzam@gentoo \
--to=arthurzam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox