[or-cvs] [pytorctl/master] Fix a couple more exceptions.
mikeperry at torproject.org
mikeperry at torproject.org
Tue Aug 10 12:20:43 UTC 2010
Author: Mike Perry <mikeperry-git at fscked.org>
Date: Tue, 10 Aug 2010 05:19:54 -0700
Subject: Fix a couple more exceptions.
Commit: eb3bc228225c44fb51c1c3a9cd79854aa3177348
---
PathSupport.py | 2 +-
TorCtl.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/PathSupport.py b/PathSupport.py
index 562e238..1aff15f 100644
--- a/PathSupport.py
+++ b/PathSupport.py
@@ -157,7 +157,7 @@ class NodeGenerator:
def rebuild(self, sorted_r=None):
""" Extra step to be performed when new routers are added or when
the restrictions change. """
- if sorted_r:
+ if sorted_r != None:
self.sorted_r = sorted_r
self.rstr_routers = filter(lambda r: self.rstr_list.r_is_ok(r), self.sorted_r)
if not self.rstr_routers:
diff --git a/TorCtl.py b/TorCtl.py
index c1f8a97..61ecf6e 100755
--- a/TorCtl.py
+++ b/TorCtl.py
@@ -1400,8 +1400,8 @@ class ConsensusTracker(EventHandler):
if len(self.routers) > 1.5*self.consensus_count:
plog("WARN", "Router count of "+str(len(self.routers))+" exceeds consensus count "+str(self.consensus_count)+" by more than 50%")
- if len(self.ns_map) > self.consensus_count:
- plog("WARN", "NS map count of "+str(len(self.ns_map))+" exceeds consensus count "+str(self.consensus_count))
+ if len(self.ns_map) < self.consensus_count:
+ plog("WARN", "NS map count of "+str(len(self.ns_map))+" is below consensus count "+str(self.consensus_count))
downed = filter(lambda r: r.down, list)
for d in downed:
--
1.7.1
More information about the tor-commits
mailing list