1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

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 <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Noel Power 2018-08-02 14:42:55 +01:00 committed by Andrew Bartlett
parent bb9e945e4a
commit 9fc6759792

View File

@ -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: