Author: atagar Date: 2011-04-03 06:12:59 +0000 (Sun, 03 Apr 2011) New Revision: 24545
Modified: arm/trunk/src/interface/controller.py arm/trunk/src/util/torConfig.py Log: Last change accidently broke torrc validation - fixing this.
Modified: arm/trunk/src/interface/controller.py =================================================================== --- arm/trunk/src/interface/controller.py 2011-04-03 05:55:58 UTC (rev 24544) +++ arm/trunk/src/interface/controller.py 2011-04-03 06:12:59 UTC (rev 24545) @@ -1675,7 +1675,7 @@ # display a popup for saving the current configuration panel.CURSES_LOCK.acquire() try: - configLines = torConfig.getCustomOptions() + configLines = torConfig.getCustomOptions(True)
# lists event types popup = panels["popup"]
Modified: arm/trunk/src/util/torConfig.py =================================================================== --- arm/trunk/src/util/torConfig.py 2011-04-03 05:55:58 UTC (rev 24544) +++ arm/trunk/src/util/torConfig.py 2011-04-03 06:12:59 UTC (rev 24545) @@ -351,9 +351,13 @@
return tuple(MULTILINE_PARAM)
-def getCustomOptions(): +def getCustomOptions(includeValue = False): """ Provides the torrc parameters that differ from their defaults. + + Arguments: + includeValue - provides the current value with results if true, otherwise + this just contains the options """
configText = torTools.getConn().getInfo("config-text", "").strip() @@ -370,7 +374,8 @@ try: configLines.remove("Log notice stdout") except ValueError: pass
- return configLines + if includeValue: return configLines + else: return [line[:line.find(" ")] for line in configLines]
def validate(contents = None): """
tor-commits@lists.torproject.org