From: Noel Power Date: Thu, 2 Aug 2018 13:42:55 +0000 (+0100) Subject: PY3: enclose filter with list as len on result of filter fails X-Git-Tag: tdb-1.3.17~1552 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fc6759792e631d73d1ccd7b22de8314bad42624;p=thirdparty%2Fsamba.git PY3: enclose filter with list as len on result of filter fails filter returns an iterator in PY3 (and a list in PY2) Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py index 2f2882d742e..70bd42cc311 100644 --- a/buildtools/wafsamba/samba_abi.py +++ b/buildtools/wafsamba/samba_abi.py @@ -190,8 +190,8 @@ def abi_write_vscript(f, libname, current_version, versions, symmap, abi_match): f.write("}%s;\n\n" % last_key) last_key = " %s" % symver f.write("%s {\n" % current_version) - local_abi = filter(lambda x: x[0] == '!', abi_match) - global_abi = filter(lambda x: x[0] != '!', abi_match) + local_abi = list(filter(lambda x: x[0] == '!', abi_match)) + global_abi = list(filter(lambda x: x[0] != '!', abi_match)) f.write("\tglobal:\n") if len(global_abi) > 0: for x in global_abi: