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

[or-cvs] r19717: {torflow} Fix termination condition and an undefined function referenc (torflow/trunk/CircuitAnalysis/BuildTimes)



Author: mikeperry
Date: 2009-06-15 05:54:50 -0400 (Mon, 15 Jun 2009)
New Revision: 19717

Modified:
   torflow/trunk/CircuitAnalysis/BuildTimes/buildtimes.py
Log:

Fix termination condition and an undefined function
reference.



Modified: torflow/trunk/CircuitAnalysis/BuildTimes/buildtimes.py
===================================================================
--- torflow/trunk/CircuitAnalysis/BuildTimes/buildtimes.py	2009-06-15 06:42:19 UTC (rev 19716)
+++ torflow/trunk/CircuitAnalysis/BuildTimes/buildtimes.py	2009-06-15 09:54:50 UTC (rev 19717)
@@ -38,9 +38,10 @@
       use_all_exits=False,
       uniform=True,
       use_exit=None,
-      use_guards=True,
+      use_guards=False,
       restrict_guards=False)
-      #extra_node_rstr=PathSupport.RateLimitedRestriction(True))
+#      extra_node_rstr=PathSupport.FlagsRestriction(mandatory=[], 
+#                             forbidden=["V2Dir"]))
 
 # Original value of FetchUselessDescriptors
 FUDValue = None
@@ -67,6 +68,8 @@
     self.circ_built = 0
     self.nstats = nstats
     self.done = False
+    if self.selmgr.bad_restrictions:
+      raise PathSupport.NoNodesRemain("No nodes remain after init")
     # Set up the exit restriction to include either 443 or 80 exits.
     # Since Tor dynamically pre-builds circuits depending on port usage, and 
     # these are the two most commonly used user ports, this seems as good 
@@ -253,12 +256,11 @@
     return
  
   for i in xrange(0,ncircuits):
-    print 'Building circuit',i
     try:
       def circuit_builder(h):
         # reschedule if some number n circuits outstanding
+        from TorCtl.TorUtil import plog
         if h.circ_count - h.circ_succeeded - h.circ_failed > max_circuits:
-          from TorCtl.TorUtil import plog
           plog("DEBUG", "Too many circuits: "+str(h.circ_count-h.circ_succeeded-h.circ_failed)+", delaying build")
           h.schedule_low_prio(circuit_builder)
           return