[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [chutney/master] python3: filters aren't lists.
commit 386afd94bcaeda119cba7dac4e742dbc8205e265
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Feb 28 12:24:04 2019 -0500
python3: filters aren't lists.
The filter() builtin now returns a generator, rather than a list.
We need to explicitly convert the generators to a list for python3.
---
scripts/chutney_tests/verify.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/chutney_tests/verify.py b/scripts/chutney_tests/verify.py
index 82394d2..3e0455d 100644
--- a/scripts/chutney_tests/verify.py
+++ b/scripts/chutney_tests/verify.py
@@ -76,6 +76,11 @@ def _verify_traffic(network):
n._env['tag'].startswith('h') or
('hs' in n._env.keys() and n._env['hs'] == 1),
network._nodes)
+ # Make sure these lists are actually lists. (It would probably
+ # be better to do list comprehensions here.)
+ client_list = list(client_list)
+ exit_list = list(exit_list)
+ hs_list = list(hs_list)
if len(client_list) == 0:
print(" Unable to verify network: no client nodes available")
return False
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits