[tor-commits] [ooni-probe/master] Work on input file handling

art at torproject.org art at torproject.org
Sun Oct 7 23:35:36 UTC 2012


commit 09b3483dd2577e1a78eee47db8d04a3fcb5b1db8
Author: Arturo Filastò <arturo at filasto.net>
Date:   Sun Oct 7 23:35:43 2012 +0000

    Work on input file handling
---
 ooni/runner.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ooni/runner.py b/ooni/runner.py
index 1a03814..bb63428 100644
--- a/ooni/runner.py
+++ b/ooni/runner.py
@@ -94,18 +94,18 @@ def adaptLegacyTest(obj, config):
     return LegacyOONITest
 
 def processTest(obj, config):
-    if obj.optParameters or obj.inputFile:
+    inputFile = obj.inputFile
+
+    if obj.optParameters or inputFile:
         if not obj.optParameters:
             obj.optParameters = []
 
+        if inputFile:
+            obj.optParameters.append(inputFile)
+
         class Options(usage.Options):
             optParameters = obj.optParameters
 
-        inputFile = obj.inputFile
-        if inputFile:
-            Options.optParameters.append(inputFile)
-
-        print Options.optParameters
         options = Options()
         options.parseOptions(config['subArgs'])
 



More information about the tor-commits mailing list