]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
prune: simplify expression for py3
authorKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Sat, 23 Nov 2019 17:06:04 +0000 (18:06 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Fri, 13 Dec 2019 16:49:38 +0000 (17:49 +0100)
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
teuthology/prune.py

index a98547a67a30894e986f4a5e1de9518543c88b52..dc720cb1eacfdab998cb2e6f48fa3157e537689c 100644 (file)
@@ -50,10 +50,7 @@ def prune_archive(
     log.debug("Archive {archive} has {count} children".format(
         archive=archive_dir, count=len(os.listdir(archive_dir))))
     # Use full paths
-    children = map(
-        lambda p: os.path.join(archive_dir, p),
-        listdir(archive_dir)
-    )
+    children = [os.path.join(archive_dir, p) for p in listdir(archive_dir)]
     run_dirs = list()
     for child in children:
         # Ensure that the path is not a symlink, is a directory, and is old