From 3551a0395c7358e52e0a8f15cca6f149e026e646 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Tue, 27 Jun 2017 23:29:55 -0300 Subject: [PATCH] 11789: Converting a filter() iterable to list, for python3 compatibility. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- sdk/python/arvados/commands/put.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/python/arvados/commands/put.py b/sdk/python/arvados/commands/put.py index 9fa68ecfe4..a0f64e1de4 100644 --- a/sdk/python/arvados/commands/put.py +++ b/sdk/python/arvados/commands/put.py @@ -486,22 +486,22 @@ class ArvPutUploadJob(object): root_relpath = '' # Exclude files/dirs by full path matching pattern if self.exclude_paths: - dirs[:] = filter( + dirs[:] = list(filter( lambda d: not any( [pathname_match(os.path.join(root_relpath, d), pat) for pat in self.exclude_paths]), - dirs) - files = filter( + dirs)) + files = list(filter( lambda f: not any( [pathname_match(os.path.join(root_relpath, f), pat) for pat in self.exclude_paths]), - files) + files)) # Exclude files/dirs by name matching pattern if self.exclude_names is not None: - dirs[:] = filter(lambda d: not self.exclude_names.match(d), dirs) - files = filter(lambda f: not self.exclude_names.match(f), files) + dirs[:] = list(filter(lambda d: not self.exclude_names.match(d), dirs)) + files = list(filter(lambda f: not self.exclude_names.match(f), files)) # Make os.walk()'s dir traversing order deterministic dirs.sort() files.sort() -- 2.30.2