[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit fad04d7b705cfe2b70e571099f02d37b9acaed80
Author: Arturo Filastò <art@xxxxxxxxx>
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):



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits