[tor-commits] [chutney/master] python3: itervalues no longer exists

nickm at torproject.org nickm at torproject.org
Mon Mar 11 00:33:44 UTC 2019


commit bb4c2d261b97126aec4e4d31aa47b827bbeeedcf
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Feb 28 12:58:40 2019 -0500

    python3: itervalues no longer exists
    
    Fortunately, the peers dict is small, so we can just use values()
---
 lib/chutney/Traffic.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/chutney/Traffic.py b/lib/chutney/Traffic.py
index 0c7776a..7b3e6d4 100644
--- a/lib/chutney/Traffic.py
+++ b/lib/chutney/Traffic.py
@@ -356,7 +356,7 @@ class TrafficTester():
         return self.get_by_ptype(Peer.SOURCE)
 
     def get_by_ptype(self, ptype):
-        return filter(lambda p: p.type == ptype, self.peers.itervalues())
+        return list(filter(lambda p: p.type == ptype, self.peers.values()))
 
     def add(self, peer):
         self.peers[peer.fd()] = peer





More information about the tor-commits mailing list