diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2022-12-25 20:30:16 +0200 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2022-12-25 20:30:16 +0200 |
commit | fff34f3c83e8f61b99b09c4b08b8fb72fb68e9e8 (patch) | |
tree | c67ab8e45e6456e915ff15d1499b670f43bcc966 | |
parent | remove osutils.native_readdir.listdir (diff) | |
download | snakeoil-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>
-rw-r--r-- | src/snakeoil/osutils/native_readdir.py | 9 |
1 files 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) + ] |