[tor-commits] [compass/master] Changed the way select_relay gets called

karsten at torproject.org karsten at torproject.org
Mon Jan 7 07:09:40 UTC 2013


commit 071765df2d8326c46555607f78af2f918d0c96f2
Author: Chris Wacek <cwacek at cs.georgetown.edu>
Date:   Sun Dec 23 00:26:43 2012 -0500

    Changed the way select_relay gets called
---
 app.py |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/app.py b/app.py
index f200f8f..665f9f2 100644
--- a/app.py
+++ b/app.py
@@ -120,18 +120,12 @@ def json_result():
     options = Opt(dict(request.args.items()))
 
     stats = compass.RelayStats(options)
-    results = stats.select_relays(stats.relays,
-                                  by_country=options.by_country,
-                                  by_as_number=options.by_as,
-                                  links=options.links)
-
+    results = stats.select_relays(stats.relays, options)
 
     relays = stats.sort_and_reduce(results,
                                    options)
 
-    return Response(json.dumps(relays, cls=ResultEncoder), mimetype='application/json') 
-
-
+    return Response(json.dumps(relays, cls=ResultEncoder), mimetype='application/json')
 
 @app.route('/result', methods=['GET'])
 def result():





More information about the tor-commits mailing list