[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Add failedOpeningReport to reporter created errback
commit fd5d08666f52031ed3341f6b23775dcfaeaaf71c
Author: aagbsn <aagbsn@xxxxxxxx>
Date: Mon Feb 4 13:08:02 2013 -0500
Add failedOpeningReport to reporter created errback
---
ooni/reporter.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ooni/reporter.py b/ooni/reporter.py
index b01c99e..23cca69 100644
--- a/ooni/reporter.py
+++ b/ooni/reporter.py
@@ -33,7 +33,7 @@ from ooni.utils.net import BodyReceiver, StringProducer, userAgents
from ooni import config
-from ooni.tasks import ReportEntry
+from ooni.tasks import ReportEntry, TaskTimedOut
class ReporterException(Exception):
pass
@@ -384,10 +384,12 @@ class Report(object):
created callback of the reporter whose report got created.
"""
for reporter in self.reporters:
+ reporter.created.addErrback(self.failedOpeningReport, reporter)
d = defer.maybeDeferred(reporter.createReport)
d.addCallback(reporter.created.callback)
d.addErrback(reporter.created.callback)
+
def failedOpeningReport(self, failure, reporter):
"""
This errback get's called every time we fail to create a report.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits