commit bedf7034ccdd42782c3bff44f1488d771d791a8d Author: Arturo Filastò art@torproject.org Date: Fri Jul 27 18:58:51 2012 +0200
Fix bug in script ending API --- ooni/ooniprobe.py | 3 ++- ooni/plugins/daphn3.py | 2 ++ ooni/plugoo/tests.py | 1 + 3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ooni/ooniprobe.py b/ooni/ooniprobe.py index b75deca..5cde3b6 100755 --- a/ooni/ooniprobe.py +++ b/ooni/ooniprobe.py @@ -84,7 +84,8 @@ def runTest(test, options, global_options, reactor=reactor): test.runTool() return
- if test.end: + if test.ended: + print "Ending prematurely" return
wgen = work.WorkGenerator(test, diff --git a/ooni/plugins/daphn3.py b/ooni/plugins/daphn3.py index 6c1186e..bdba5d9 100644 --- a/ooni/plugins/daphn3.py +++ b/ooni/plugins/daphn3.py @@ -136,6 +136,8 @@ class daphn3Test(OONITest): #return endpoint.connect(Daphn3ClientFactory)
def load_assets(self): + if not self.local_options: + return {} if not self.steps: print "Error: No assets!" self.end() diff --git a/ooni/plugoo/tests.py b/ooni/plugoo/tests.py index 482b8bc..1683ebc 100644 --- a/ooni/plugoo/tests.py +++ b/ooni/plugoo/tests.py @@ -26,6 +26,7 @@ class OONITest(object): blocking = False reactor = None tool = False + ended = False
def __init__(self, local_options, global_options, report, ooninet=None, reactor=None):