[tor-commits] [metrics-tasks/master] No need to memorize country names if we can use country codes instead (#6232).

karsten at torproject.org karsten at torproject.org
Tue Jul 24 10:11:21 UTC 2012


commit 4b5dd9843fc063bdadcda1d18c5eccc797f73406
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Tue Jul 24 09:48:46 2012 +0200

    No need to memorize country names if we can use country codes instead (#6232).
---
 task-6232/pyentropy.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/task-6232/pyentropy.py b/task-6232/pyentropy.py
index 08e0218..ba11d24 100644
--- a/task-6232/pyentropy.py
+++ b/task-6232/pyentropy.py
@@ -39,7 +39,7 @@ class Router:
     def add_router_info(self, values):
            self.hex_digest = b2a_hex(a2b_base64(values[2]+"="))
            ip = values[5]
-           self.country = gi_db.country_name_by_addr(ip)
+           self.country = gi_db.country_code_by_addr(ip)
            self.as_no = self.get_as_details(ip)
 
     def add_weights(self, values):





More information about the tor-commits mailing list