[reprotest] 01/01: use a list comprehension for slightly more idiomatic python than map/lambda

Ximin Luo infinity0 at debian.org
Thu Sep 22 18:06:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository reprotest.

commit 0876afcdddda6ed58c5a15020f00251f9897ad31
Author: Ximin Luo <infinity0 at debian.org>
Date:   Thu Sep 22 20:05:48 2016 +0200

    use a list comprehension for slightly more idiomatic python than map/lambda
---
 reprotest/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index 3ebaeb4..c28d9d8 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -314,7 +314,7 @@ def build(script, source_root, dist_root, artifact_pattern, testbed, artifact_st
     # testbed.execute(['ls', '-l', source_root])
     # testbed.execute(['stat', source_root])
     # testbed.execute(['stat', built_artifact])
-    patterns = " ".join(map(lambda x: os.path.join(source_root, x), shlex.split(artifact_pattern)))
+    patterns = " ".join(os.path.join(source_root, part) for part in shlex.split(artifact_pattern))
     testbed.check_exec(
         ['sh', '-ec', 'mkdir -p "%s" && cp -R -t "%s" %s && touch -d at 0 "%s" "%s"/*' %
         (dist_root, dist_root, patterns, dist_root, dist_root)])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git



More information about the Reproducible-commits mailing list