[or-cvs] [torflow/master 67/92] Simpler BaseHTTPTest add_target
mikeperry at torproject.org
mikeperry at torproject.org
Sat Aug 21 05:14:00 UTC 2010
Author: John M. Schanck <john at anomos.info>
Date: Sat, 7 Aug 2010 18:32:03 -0400
Subject: Simpler BaseHTTPTest add_target
Commit: 410e55d9fa46c08be8cf3081ef685a009cddce8d
---
NetworkScanners/ExitAuthority/soat.py | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/NetworkScanners/ExitAuthority/soat.py b/NetworkScanners/ExitAuthority/soat.py
index 0f23acb..1e087fc 100755
--- a/NetworkScanners/ExitAuthority/soat.py
+++ b/NetworkScanners/ExitAuthority/soat.py
@@ -954,15 +954,12 @@ class BaseHTTPTest(Test):
else:
return TEST_SUCCESS
- def add_target(self, target, type=None):
+ def add_target(self, target):
# HTTP Tests keep an additional dictionary of targets keyed by filetype
- if type is None:
- split = target.rsplit('.',1)
- if len(split) > 1:
- type = split[-1]
- if type in self.scan_filetypes:
+ split = target.rsplit('.',1)
+ if len(split) > 1 and split[-1] in self.scan_filetypes:
self.targets.append(target)
- self.targets_by_type.setdefault(type, []).append(target)
+ self.targets_by_type.setdefault(split[-1], []).append(target)
def remove_target(self, target, reason="None"):
# Remove from targets list and targets by type dictionary
--
1.7.1
More information about the tor-commits
mailing list