[tor-commits] [flashproxy/master] Shorter num_relays.

infinity0 at torproject.org infinity0 at torproject.org
Mon Oct 28 14:47:40 UTC 2013


commit 704fa5e1cf3669836c9f2b642eda086b866a2cad
Author: David Fifield <david at bamsoftware.com>
Date:   Fri Sep 20 22:57:48 2013 -0700

    Shorter num_relays.
---
 facilitator/facilitator |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/facilitator/facilitator b/facilitator/facilitator
index 481ccdd..9610993 100755
--- a/facilitator/facilitator
+++ b/facilitator/facilitator
@@ -70,11 +70,7 @@ again. Listen on 127.0.0.1 and port PORT (by default %(port)d).
 }
 
 def num_relays():
-    num_relays = 0
-    for relay_list in RELAYS.values():
-        num_relays += len(relay_list)
-
-    return num_relays
+    return sum(len(x) for x in RELAYS.values())
 
 def parse_transport_chain(spec):
     """Parse a transport chain string and return a tuple of individual





More information about the tor-commits mailing list