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

[tor-commits] [metrics-tasks/master] Accept "AS"-prefixed ASes or just AS numbers (#6329).



commit a0a2e0e0900832f78ce14d13fd5fa41417562717
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Fri Jul 20 15:48:20 2012 +0200

    Accept "AS"-prefixed ASes or just AS numbers (#6329).
---
 task-6329/tor-relays-stats.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/task-6329/tor-relays-stats.py b/task-6329/tor-relays-stats.py
index fc9b14c..09bf98a 100755
--- a/task-6329/tor-relays-stats.py
+++ b/task-6329/tor-relays-stats.py
@@ -27,6 +27,8 @@ class RelayStats(object):
         relays = []
         if countries:
             countries = [x.lower() for x in countries]
+        if as_sets:
+            as_sets = [x if not x.isdigit() else "AS" + x for x in as_sets]
         for relay in self.data['relays']:
             if not relay['running']:
                 continue



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