[tor-commits] [ooni-probe/master] * Changed the nettest inputParser to no longer be wrapped by @staticmethod, because that might be confusing to test writers.

isis at torproject.org isis at torproject.org
Thu Nov 8 07:44:08 UTC 2012


commit 6d971bc3c49c50084d047ea77546a2eec7a53d84
Author: Isis Lovecruft <isis at torproject.org>
Date:   Mon Nov 5 14:04:53 2012 +0000

    * Changed the nettest inputParser to no longer be wrapped by @staticmethod, because that might be confusing to test writers.
---
 nettests/echo.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/nettests/echo.py b/nettests/echo.py
index bc47519..793f224 100644
--- a/nettests/echo.py
+++ b/nettests/echo.py
@@ -126,15 +126,15 @@ class EchoTest(ScapyTest):
                   % (self.name, ''.join(self.__dict__)))
 
     @staticmethod
-    def inputParser(inputs):
+    def inputParser(self, one_input):
         log.debug("Removing possible ports from host addresses...")
         log.debug("Initial inputs:\n%s" % pprint(inputs))
 
-        assert isinstance(inputs, list)
-        hosts = [h.rsplit(':', 1)[0] for h in inputs]
+        #host = [h.rsplit(':', 1)[0] for h in inputs]
+        host = h.rsplit(':', 1)[0]
         log.debug("Inputs converted to:\n%s" % hosts)
 
-        return hosts
+        return host
 
     def tryInterfaces(self, ifaces):
         try:





More information about the tor-commits mailing list