[or-cvs] r16881: {projects} Add a patch by kaner for a reasonable default file and a met (projects/gettor)

ioerror at seul.org ioerror at seul.org
Sat Sep 13 01:43:10 UTC 2008


Author: ioerror
Date: 2008-09-12 21:43:10 -0400 (Fri, 12 Sep 2008)
New Revision: 16881

Modified:
   projects/gettor/gettor_config.py
Log:
Add a patch by kaner for a reasonable default file and a method to fetch it.


Modified: projects/gettor/gettor_config.py
===================================================================
--- projects/gettor/gettor_config.py	2008-09-13 01:34:59 UTC (rev 16880)
+++ projects/gettor/gettor_config.py	2008-09-13 01:43:10 UTC (rev 16881)
@@ -23,6 +23,7 @@
     distDir = "/var/lib/gettor/pkg/"
     locale = "en"
     logSubSystem = None
+    logFile = "/dev/null"
     configFile = "~/.gettorrc"
     config = ConfigParser.ConfigParser()
 
@@ -79,6 +80,11 @@
         else:
             self.config.set("global", "logSubSystem", self.logSubSystem)
 
+        if self.config.has_option("global", "logFile"):
+            self.lang = self.config.get("global", "logFile")
+        else:
+            self.config.set("global", "logFile", self.logFile)
+
     def printConfiguration(self):
         return self.config.write(sys.stdout)
 
@@ -101,6 +107,9 @@
     def getLogSubSystem(self):
         return self.logSubSystem
 
+    def getLogFile(self):
+        return self.logFile
+
 if __name__ == "__main__" :
     c = gettorConf()
     print "# This is a suitable default configuration. Tune to fit your needs."



More information about the tor-commits mailing list