diff options
author | Noel Power <noel.power@suse.com> | 2018-11-28 14:15:23 +0000 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2018-12-10 10:38:21 +0100 |
commit | 00133791d542f3c89aa4b7c2272d2150a252c3ab (patch) | |
tree | 5bf73432b4825e62909162b01882dd84af0a071d /source4 | |
parent | a25bd836ee601ca704d2899f17259b9b5cd440cf (diff) | |
download | samba-00133791d542f3c89aa4b7c2272d2150a252c3ab.tar.gz |
PY3: wrap filter calls with list where list is expected
filter in PY2 returns list in PY3 it returns an iterator
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/selftest/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index c676b878b83..ca43770dfca 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -76,7 +76,7 @@ try: lines = f.readlines() config_hash = dict((x[0], ' '.join(x[1:])) for x in map(lambda line: line.strip().split(' ')[1:], - filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines))) + list(filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines)))) finally: f.close() @@ -177,7 +177,7 @@ all_rpc_tests = ncalrpc_tests + ncacn_np_tests + ncacn_ip_tcp_tests + slow_ncacn # Make sure all tests get run rpc_tests = smbtorture4_testsuites("rpc.") -auto_rpc_tests = filter(lambda t: t not in all_rpc_tests, rpc_tests) +auto_rpc_tests = list(filter(lambda t: t not in all_rpc_tests, rpc_tests)) for bindoptions in ["seal,padcheck"] + validate_list + ["bigendian"]: for transport in ["ncalrpc", "ncacn_np", "ncacn_ip_tcp"]: @@ -230,7 +230,7 @@ for t in smbtorture4_testsuites("dfs."): plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/ipc\$ -U$USERNAME%$PASSWORD') # Tests for the NET API (net.api.become.dc tested below against all the roles) -net_tests = filter(lambda x: "net.api.become.dc" not in x, smbtorture4_testsuites("net.")) +net_tests = list(filter(lambda x: "net.api.become.dc" not in x, smbtorture4_testsuites("net."))) for t in net_tests: plansmbtorture4testsuite(t, "ad_dc_ntvfs", '$SERVER[%s] -U$USERNAME%%$PASSWORD -W$DOMAIN' % validate) |