commit 422e315dbd87234e2dc5317222a96c65c72cc592 Author: Arturo Filastò hellais@torproject.org Date: Fri Jun 1 22:04:17 2012 +0200
Fix non blocking test launching. Minor refactoring. --- ooni/plugins/httphost.py | 1 - ooni/plugoo/tests.py | 2 +- ooni/plugoo/work.py | 1 + 3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ooni/plugins/httphost.py b/ooni/plugins/httphost.py index 2c7f8af..45ab587 100644 --- a/ooni/plugins/httphost.py +++ b/ooni/plugins/httphost.py @@ -107,7 +107,6 @@ class HTTPHostTest(OONITest):
def experiment(self, args): control_server = self.local_options['controlserver'] - print args censored = self.httplib_test(control_server, args['asset']) return {'control': control_server, 'host': args['asset'], diff --git a/ooni/plugoo/tests.py b/ooni/plugoo/tests.py index 8e0ab8e..0632670 100644 --- a/ooni/plugoo/tests.py +++ b/ooni/plugoo/tests.py @@ -53,7 +53,7 @@ class OONITest(object): if self.blocking: self.d = threads.deferToThread(self.experiment, args) else: - self.d = defer.maybeDeferred(self.experiment, args) + self.d = self.experiment(args)
self.d.addCallback(self.control, args) self.d.addCallback(self.finished) diff --git a/ooni/plugoo/work.py b/ooni/plugoo/work.py index 24a2b46..16a6e2c 100644 --- a/ooni/plugoo/work.py +++ b/ooni/plugoo/work.py @@ -129,6 +129,7 @@ class WorkGenerator(object): self.Test = test
if self.Test.assets and self.Test.assets.values()[0]: + print self.Test.assets self.assetGenerator = itertools.product(*self.Test.assets.values()) else: self.assetGenerator = None