[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Initialize reporters in startNetTest, not Director __init__
commit f6bae38ccd45ab4360148e617e497d451f6128c3
Author: aagbsn <aagbsn@xxxxxxxx>
Date: Sat Jan 19 15:20:50 2013 +0000
Initialize reporters in startNetTest, not Director __init__
---
ooni/director.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/ooni/director.py b/ooni/director.py
index 93e39bd..7bc19f8 100644
--- a/ooni/director.py
+++ b/ooni/director.py
@@ -58,9 +58,7 @@ class Director(object):
"""
_scheduledTests = 0
- def __init__(self, reporters):
- self.reporters = reporters
-
+ def __init__(self):
self.netTests = []
self.activeNetTests = []
@@ -172,7 +170,7 @@ class Director(object):
def netTestDone(self, result, net_test):
self.activeNetTests.remove(net_test)
- def startNetTest(self, _, net_test_loader):
+ def startNetTest(self, _, net_test_loader, reporters):
"""
Create the Report for the NetTest and start the report NetTest.
@@ -182,7 +180,7 @@ class Director(object):
_: #XXX very dirty hack
"""
- report = Report(self.reporters, self.reportEntryManager)
+ report = Report(reporters, self.reportEntryManager)
net_test = NetTest(net_test_loader, report)
net_test.director = self
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits