[or-cvs] r24047: {arm} Workaround for config-text providing Log entries that match (arm/trunk/src/util)

Damian Johnson atagar1 at gmail.com
Fri Jan 7 16:08:29 UTC 2011


Author: atagar
Date: 2011-01-07 16:08:29 +0000 (Fri, 07 Jan 2011)
New Revision: 24047

Modified:
   arm/trunk/src/util/torConfig.py
Log:
Workaround for config-text providing Log entries that match the default value (thanks to Trystero)



Modified: arm/trunk/src/util/torConfig.py
===================================================================
--- arm/trunk/src/util/torConfig.py	2011-01-07 04:18:02 UTC (rev 24046)
+++ arm/trunk/src/util/torConfig.py	2011-01-07 16:08:29 UTC (rev 24047)
@@ -352,7 +352,11 @@
   
   customOptions, conn = set(), torTools.getConn()
   configTextQuery = conn.getInfo("config-text", "").strip().split("\n")
-  for entry in configTextQuery: customOptions.add(entry[:entry.find(" ")])
+  
+  for entry in configTextQuery:
+    # tor provides a Log entry even if it matches the default
+    if entry != "Log notice stdout":
+      customOptions.add(entry[:entry.find(" ")])
   return customOptions
 
 def validate(contents = None):



More information about the tor-commits mailing list