[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r15851: remove minor search cruft (blossom/trunk)
Author: goodell
Date: 2008-07-11 23:28:35 -0400 (Fri, 11 Jul 2008)
New Revision: 15851
Modified:
blossom/trunk/blossom.py
Log:
remove minor search cruft
Modified: blossom/trunk/blossom.py
===================================================================
--- blossom/trunk/blossom.py 2008-07-11 21:42:09 UTC (rev 15850)
+++ blossom/trunk/blossom.py 2008-07-12 03:28:35 UTC (rev 15851)
@@ -1599,23 +1599,22 @@
chosen_dir = ""
min = MAXINT
- if not dest in target_array:
- for dir in summary.keys():
- if summary[dir].has_key(dest) and not seq.__contains__(dir):
- log_msg(2, "--- prop.keys(): %s" % prop.keys())
- if prop.has_key(dir):
- if len(prop[dir]) < min:
- min = len(prop[dir])
- chosen_dir = dir
- elif seq:
- min = 0
+ for dir in summary.keys():
+ if summary[dir].has_key(dest) and not seq.__contains__(dir):
+ log_msg(2, "--- prop.keys(): %s" % prop.keys())
+ if prop.has_key(dir):
+ if len(prop[dir]) < min:
+ min = len(prop[dir])
chosen_dir = dir
+ elif seq:
+ min = 0
+ chosen_dir = dir
- if not chosen_dir:
- for dir in summary_remote.keys():
- if summary_remote[dir].has_key(dest) and not seq.__contains__(dir):
- log_msg(2, "--- prop.keys(): %s" % prop.keys())
- chosen_dir = dir
+ if not chosen_dir:
+ for dir in summary_remote.keys():
+ if summary_remote[dir].has_key(dest) and not seq.__contains__(dir):
+ log_msg(2, "--- prop.keys(): %s" % prop.keys())
+ chosen_dir = dir
if chosen_dir == dest:
break
@@ -1625,12 +1624,11 @@
log_msg(2, "*** selecting directory: %s" % chosen_dir)
seq.append(chosen_dir)
- if not dest in target_array:
- if prop.has_key(chosen_dir):
- reversed = prop[chosen_dir]
- reversed.reverse()
- for elt in reversed:
- seq.append(elt)
+ if prop.has_key(chosen_dir):
+ reversed = prop[chosen_dir]
+ reversed.reverse()
+ for elt in reversed:
+ seq.append(elt)
log_msg(2, "*** stream %s current route to %s: %s" % (streamID, dest, repr(seq)))
log_msg(3, "--- port: %s" % repr(port))