[tor-commits] [ooni-probe/master] Minor cleaning of Measurement Task

isis at torproject.org isis at torproject.org
Sun Mar 10 01:57:01 UTC 2013


commit fad04d7b705cfe2b70e571099f02d37b9acaed80
Author: Arturo Filastò <art at fuffa.org>
Date:   Sat Jan 12 19:34:31 2013 +0100

    Minor cleaning of Measurement Task
---
 ooni/tasks.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/ooni/tasks.py b/ooni/tasks.py
index 55f09bd..a53287e 100644
--- a/ooni/tasks.py
+++ b/ooni/tasks.py
@@ -106,7 +106,7 @@ class Measurement(TaskWithTimeout):
         self.netTest = net_test
 
     def succeeded(self):
-        self.net_test.succeeded()
+        self.net_test.succeeded(self)
 
     def failed(self):
         pass
@@ -115,10 +115,7 @@ class Measurement(TaskWithTimeout):
         self.net_test.timedOut()
 
     def run(self):
-        d = defer.maybeDeferred(self.test)
-        d.addCallback(self.success)
-        d.addErrback(self.failure)
-        return d
+        return defer.maybeDeferred(self.test)
 
 class ReportEntry(TaskWithTimeout):
     def __init__(self, reporter, measurement):





More information about the tor-commits mailing list