[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [doctor/master] Pluralizing 'nickname_to_relay'



commit ed76f2f4157a4b239d86a4d599259a7c98c92a09
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Sep 30 15:21:04 2013 -0700

    Pluralizing 'nickname_to_relay'
    
    Oops, forgot to change the name of the variable when we made it map nicknames
    to a list of relays instead.
---
 sybil_checker.py |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sybil_checker.py b/sybil_checker.py
index ae43f8c..3dada88 100755
--- a/sybil_checker.py
+++ b/sybil_checker.py
@@ -78,15 +78,15 @@ def send_email(new_relays):
   # Constructs a mapping of nicknames to router status entries so we can
   # provide a listing that's sorted by nicknames.
 
-  nickname_to_relay = {}
+  nickname_to_relays = {}
 
   for entry in new_relays:
-    nickname_to_relay.setdefault(entry.nickname, []).append(entry)
+    nickname_to_relays.setdefault(entry.nickname, []).append(entry)
 
   relay_entries = []
 
-  for nickname in sorted(nickname_to_relay.keys()):
-    for relay in nickname_to_relay[nickname]:
+  for nickname in sorted(nickname_to_relays.keys()):
+    for relay in nickname_to_relays[nickname]:
       relay_entries.append(RELAY_ENTRY % (relay.nickname, relay.fingerprint, relay.address, relay.or_port, relay.version, relay.exit_policy))
 
   try:

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits