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

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



commit 071765df2d8326c46555607f78af2f918d0c96f2
Author: Chris Wacek <cwacek@xxxxxxxxxxxxxxxxx>
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():



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