[or-cvs] [torflow/master 37/92] Typos and whitespace correction

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 01:01:49 -0400
Subject: Typos and whitespace correction
Commit: 5f78622f8cee888694c577bc1b817a495561c2f0

---
 NetworkScanners/ExitAuthority/libsoat.py |    2 +-
 NetworkScanners/ExitAuthority/soat.py    |   32 +++++++++++++++---------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/NetworkScanners/ExitAuthority/libsoat.py b/NetworkScanners/ExitAuthority/libsoat.py
index d04f775..67fc8d2 100644
--- a/NetworkScanners/ExitAuthority/libsoat.py
+++ b/NetworkScanners/ExitAuthority/libsoat.py
@@ -687,7 +687,7 @@ class DataHandler:
     if result.__class__.__name__ in ('HtmlTestResult', 'HttpTestResult'):
       address = DataHandler.safeFilename(result.site.replace('http://',''))
     elif result.__class__.__name__ == 'SSLTestResult':
-      address = DataHandler.safeFilename(result.site.replace('https://','')
+      address = DataHandler.safeFilename(result.site.replace('https://',''))
     elif 'TestResult' in result.__class__.__name__:
       address = DataHandler.safeFilename(result.site)
     else:
diff --git a/NetworkScanners/ExitAuthority/soat.py b/NetworkScanners/ExitAuthority/soat.py
index cb3215a..905633f 100755
--- a/NetworkScanners/ExitAuthority/soat.py
+++ b/NetworkScanners/ExitAuthority/soat.py
@@ -1091,7 +1091,7 @@ class BaseHTTPTest(Test):
           plog("NOTICE", "Non-Tor HTTP "+str(code_new)+" redirect from "+address+" to "+str(content_new))
           # Remove the original URL and add the redirect to our targets (if it's of the right type)
           self.remove_target(address, INCONCLUSIVE_REDIRECT)
-          self.add_target(content)
+          self.add_target(content_new)
           return TEST_INCONCLUSIVE
         else:
           plog("NOTICE", "Non-tor HTTP error "+str(code_new)+" fetching content for "+address)
@@ -1775,16 +1775,16 @@ class BaseSSLTest(Test):
         return TEST_INCONCLUSIVE
 
     if not ssl_domain.num_certs():
-        plog("NOTICE", "No non-tor certs available for "+address)
-        result = SSLTestResult("NoExit", "NoStored!", address, ssl_file_name,
-                               TEST_INCONCLUSIVE,
-                               INCONCLUSIVE_NOLOCALCONTENT)
-        if self.rescan_nodes:
-          result.from_rescan = True
-        datahandler.saveResult(result)
-        self.results.append(result)
-        self.remove_target(address, FALSEPOSITIVE_DEADSITE)
-        return TEST_INCONCLUSIVE
+      plog("NOTICE", "No non-tor certs available for "+address)
+      result = SSLTestResult("NoExit", "NoStored!", address, ssl_file_name,
+                             TEST_INCONCLUSIVE,
+                             INCONCLUSIVE_NOLOCALCONTENT)
+      if self.rescan_nodes:
+        result.from_rescan = True
+      datahandler.saveResult(result)
+      self.results.append(result)
+      self.remove_target(address, FALSEPOSITIVE_DEADSITE)
+      return TEST_INCONCLUSIVE
 
     # get the cert via tor
     (code, cert, exc) = torify(ssl_request, address)
@@ -1817,8 +1817,8 @@ class BaseSSLTest(Test):
          E_URL:         (FAILURE_URLERROR,      self.register_connect_failure, True),
          E_MISC:        (FAILURE_MISCEXCEPTION, self.register_connect_failure, True)
         }
-      if pcode in err_lookup:
-        fail_reason, register, extra_info = err_lookup[pcode]
+      if code in err_lookup:
+        fail_reason, register, extra_info = err_lookup[code]
       else:
         fail_reason = FAILURE_MISCEXCEPTION
         register = self.register_connect_failure
@@ -3007,11 +3007,11 @@ def main(argv):
       return
     plog("NOTICE", "Scanning only "+scan_exit)
     scanhdlr.new_exit()
-    testsdone = 0
-    while testsdone < len(tests):
+    tests_done = 0
+    while tests_done < len(tests):
       for test in tests.values():
         if test.finished():
-          testsdone += 1
+          tests_done += 1
           continue
         result = test.run_test()
         plog("INFO", test.proto+" test via "+scan_exit+" has result "+str(result))
-- 
1.7.1




More information about the tor-commits mailing list