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

[tor-commits] [ooni-probe/master] Disabled debug log in default config file



commit 5d0ee1bf474055f65f0913594f5c0ddb6017988e
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Thu Nov 8 16:22:09 2012 +0100

    Disabled debug log in default config file
    * Make runner rename file to .old if it already exists
---
 ooni/runner.py |   11 ++++++-----
 ooniprobe.conf |    2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ooni/runner.py b/ooni/runner.py
index 6ed89ab..1e1d6a5 100644
--- a/ooni/runner.py
+++ b/ooni/runner.py
@@ -170,17 +170,18 @@ class ORunner(object):
                 log.msg("Could not find inputs!")
                 log.msg("options[0] = %s" % first)
                 self.inputs = [None]
+
         if cmd_line_options['reportfile']:
             report_filename = cmd_line_options['reportfile']
         else:
             report_filename = 'report_'+date.timestamp()+'.yamloo'
 
         if os.path.exists(report_filename):
-            os.rename(report_filename, report_filename+'.1')
-        try:
-            reportFile = open(report_filename, 'w+')
-        except TypeError:
-            reportFile = open(filename_filename, 'w+')
+            print "Report already exists with filename %s" % report_filename
+            print "Renaming it to %s" % report_filename+'.old'
+            os.rename(report_filename, report_filename+'.old')
+
+        reportFile = open(report_filename, 'w+')
         self.reporterFactory = ReporterFactory(reportFile,
                                                testSuite=self.baseSuite(self.cases))
 
diff --git a/ooniprobe.conf b/ooniprobe.conf
index 2039951..2781476 100644
--- a/ooniprobe.conf
+++ b/ooniprobe.conf
@@ -21,5 +21,5 @@ advanced:
     # database file. This should be the directory in which OONI is installed
     # /path/to/ooni-probe/data/
     geoip_data_dir: /home/x/code/networking/ooni-probe/data/
-    debug: true
+    debug: false
 



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