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

[or-cvs] [torflow/master 66/92] Remove targets_by_type key when value is []



Author: John M. Schanck <john@xxxxxxxxxxx>
Date: Sat, 7 Aug 2010 18:31:42 -0400
Subject: Remove targets_by_type key when value is []
Commit: f4ef7e19594e8c3ff725a599285122cd33630f97

---
 NetworkScanners/ExitAuthority/soat.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/NetworkScanners/ExitAuthority/soat.py b/NetworkScanners/ExitAuthority/soat.py
index af37e60..0f23acb 100755
--- a/NetworkScanners/ExitAuthority/soat.py
+++ b/NetworkScanners/ExitAuthority/soat.py
@@ -971,6 +971,8 @@ class BaseHTTPTest(Test):
     for k,v in self.targets_by_type.items():
       if target in v:
         v.remove(target)
+        if not v:
+          del self.targets_by_type[k]
     # Delete results in httpcode_fails
     if target in self.httpcode_fails:
       del self.httpcode_fails[target]
-- 
1.7.1