From 506f3f68f14b8e554bb9e4993f37918a8b6a4c9d Mon Sep 17 00:00:00 2001 From: Ben Doherty Date: Fri, 27 May 2016 00:00:59 -0400 Subject: [PATCH] Use different syntax in lambda --- lib/ansible/modules/extras/files/archive.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/ansible/modules/extras/files/archive.py b/lib/ansible/modules/extras/files/archive.py index e4931b9877..811a9aaa00 100644 --- a/lib/ansible/modules/extras/files/archive.py +++ b/lib/ansible/modules/extras/files/archive.py @@ -229,11 +229,7 @@ def main(): if os.path.isdir(path) and not path.endswith(os.sep + '.'): basename = os.path.basename(path) + os.sep - filter_create = lambda f: - if filecmp.cmp(f.name, creates): - return f - - archive.add(path, path[len(arcroot):], filter=filter_create) + archive.add(path, path[len(arcroot):], filter=lambda f: not filecmp.cmp(f.name, creates) and f) successes.append(path) # Slightly more difficult (and less efficient!) compression using zipfile module