[tor-commits] [metrics-tasks/master] task-6329: Stop always adding relays with no country when filtering by country

karsten at torproject.org karsten at torproject.org
Tue Jul 17 09:09:16 UTC 2012


commit a4065e51c7a7762140f99d97ce945a90c3c6db49
Author: delber <delber at riseup.net>
Date:   Mon Jul 16 15:24:12 2012 +0000

    task-6329: Stop always adding relays with no country when filtering by country
---
 task-6329/tor-relays-stats.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/task-6329/tor-relays-stats.py b/task-6329/tor-relays-stats.py
index d876c76..c9ecbe7 100755
--- a/task-6329/tor-relays-stats.py
+++ b/task-6329/tor-relays-stats.py
@@ -36,7 +36,7 @@ class RelayStats(object):
                 continue
             if set(flags) & set(relay['flags']) != set(flags):
                 continue
-            if countries and not relay.get('country', '') in countries:
+            if countries and not relay.get('country', ' ') in countries:
                 continue
             if as_sets and not relay.get('as_number', ' ') in as_sets:
                 continue





More information about the tor-commits mailing list