aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-12-25 20:30:16 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2022-12-25 20:30:16 +0200
commitfff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8 (patch)
treec67ab8e45e6456e915ff15d1499b670f43bcc966 /src
parentremove osutils.native_readdir.listdir (diff)
downloadsnakeoil-fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8.tar.gz
snakeoil-fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8.tar.bz2
snakeoil-fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8.zip
fix after removal of osutils.native_readdir.listdir
Follows: 2e4f73760dcbf1fb15bea4c6a89e4a65012ef74d Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/snakeoil/osutils/native_readdir.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/snakeoil/osutils/native_readdir.py b/src/snakeoil/osutils/native_readdir.py
index d7c2fd9..6600a71 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)
+ ]