[tor-commits] [pytorctl/master] Document a pythonism that briefly confused Aaron and me.
mikeperry at torproject.org
mikeperry at torproject.org
Wed Oct 5 00:40:27 UTC 2011
commit 750d7c392766476d12cc9e47bdffffcce84bcdf5
Author: Mike Perry <mikeperry-git at fscked.org>
Date: Tue Oct 4 17:39:44 2011 -0700
Document a pythonism that briefly confused Aaron and me.
---
PathSupport.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/PathSupport.py b/PathSupport.py
index d4ffbdd..1e17e48 100644
--- a/PathSupport.py
+++ b/PathSupport.py
@@ -1607,6 +1607,9 @@ class PathBuilder(TorCtl.ConsensusTracker):
plog("WARN", "Error attaching new stream: "+str(e.args))
return
break
+ # This else clause is executed when we go through the circuit
+ # list without finding an entry (or it is empty).
+ # http://docs.python.org/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops
else:
circ = None
try:
More information about the tor-commits
mailing list