[tor-commits] [ooni-probe/master] * Fix some bugs in Daphn3

isis at torproject.org isis at torproject.org
Thu Sep 13 13:04:15 UTC 2012


commit 14ade9b22b2d91dc3c85a7d246c76cc6bc935d22
Author: Arturo Filastò <hellais at torproject.org>
Date:   Thu Aug 2 17:42:43 2012 +0200

    * Fix some bugs in Daphn3
    * Add more details to Test interface
    * Remove dead code in Reporting system
    * Make some changes to bridget
---
 ooni/ooniprobe.py      |    2 +-
 ooni/plugoo/reports.py |   13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/ooni/ooniprobe.py b/ooni/ooniprobe.py
index 3b48339..7e9eecc 100755
--- a/ooni/ooniprobe.py
+++ b/ooni/ooniprobe.py
@@ -84,7 +84,7 @@ def runTest(test, options, global_options, reactor=reactor):
         return
 
     if test.ended:
-        print "Ending prematurely"
+        print "Ending because it's ended"
         return
 
     wgen = work.WorkGenerator(test,
diff --git a/ooni/plugoo/reports.py b/ooni/plugoo/reports.py
index eb2cf4f..a6b0ac9 100644
--- a/ooni/plugoo/reports.py
+++ b/ooni/plugoo/reports.py
@@ -4,7 +4,11 @@ import os
 import yaml
 
 import itertools
+<<<<<<< HEAD
 import log
+=======
+from ooni.utils import log, date, net
+>>>>>>> * Fix some bugs in Daphn3
 
 class Report:
     """This is the ooni-probe reporting mechanism. It allows
@@ -81,13 +85,8 @@ class Report:
         """
         This reports to a file in YAML format
         """
-        if not file:
-            file = self.file
-        try:
-            with open(file, mode) as f:
-                f.write(data)
-        except Exception, e:
-            raise e
+        with open(self.file, 'a+') as f:
+            f.write(data)
 
     def send_report(self, data, type):
         """





More information about the tor-commits mailing list