[or-cvs] [torflow/master 38/92] Call parent methods (not grandparent) for overridden methods in Test subclasses

mikeperry at torproject.org mikeperry at torproject.org
Sat Aug 21 05:13:59 UTC 2010


Author: John M. Schanck <john at anomos.info>
Date: Wed, 28 Jul 2010 02:38:19 -0400
Subject: Call parent methods (not grandparent) for overridden methods in Test subclasses
Commit: 13bd72b3a539a6d1021729380e1addeeaaaf315f

---
 NetworkScanners/ExitAuthority/soat.py |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/NetworkScanners/ExitAuthority/soat.py b/NetworkScanners/ExitAuthority/soat.py
index 905633f..5c7e93a 100755
--- a/NetworkScanners/ExitAuthority/soat.py
+++ b/NetworkScanners/ExitAuthority/soat.py
@@ -2031,20 +2031,19 @@ class SearchBasedHTTPTest(SearchBasedTest, BaseHTTPTest):
     self.targets_by_type = dict.fromkeys(self.scan_filetypes, [])
 
   def depickle_upgrade(self):
-    Test.depickle_upgrade(self)
     if self._pickle_revision < 7:
       self.result_filetypes = self.scan_filetypes
       self.result_protocol = "http"
       self.results_per_type = self.fetch_targets
       self.targets_by_type = self.targets
       self.targets = reduce(list.__add__, self.targets.values(), [])
-      self._pickle_revision = 7
+    BaseHTTPTest.depickle_upgrade(self)
 
   def rewind(self):
     self.wordlist = load_wordlist(self.wordlist_file)
     self.httpcode_fails = {}
     self.targets_by_type = {}
-    Test.rewind(self)
+    BaseHTTPTest.rewind(self)
 
   def refill_targets(self):
     for ftype in self.targets_by_type:
@@ -2095,15 +2094,15 @@ class SearchBasedHTMLTest(SearchBasedTest, BaseHTMLTest):
     self.results_per_type = self.fetch_targets
 
   def depickle_upgrade(self):
-    Test.depickle_upgrade(self)
     if self._pickle_revision < 7:
       self.result_filetypes = "html"
       self.result_protocol = "http"
       self.results_per_type = self.fetch_targets
+    BaseHTMLTest.depickle_upgrade(self)
 
   def rewind(self):
     self.wordlist = load_wordlist(self.wordlist_file)
-    Test.rewind(self)
+    BaseHTMLTest.rewind(self)
 
 HTMLTest = SearchBasedHTMLTest # For resuming from old HTMLTest.*.test files
 
@@ -2116,15 +2115,15 @@ class SearchBasedSSLTest(SearchBasedTest, BaseSSLTest):
     self.search_mode=google_search_mode
 
   def depickle_upgrade(self):
-    Test.depickle_upgrade(self)
     if self._pickle_revision < 7:
       self.host_only = True
       self.result_protocol = 'https'
       self.search_mode=google_search_mode
+    BaseSSLTest.depickle_upgrade(self)
 
   def rewind(self):
     self.wordlist = load_wordlist(self.wordlist_file)
-    Test.rewind(self)
+    BaseSSLTest.rewind(self)
 
 SSLTest = SearchBasedSSLTest # For resuming from old SSLTest.*.test files
 
-- 
1.7.1




More information about the tor-commits mailing list