commit 3d11f21692fbb30589181c1ed66e71250ffc89e6 Author: Damian Johnson atagar@torproject.org Date: Thu May 12 07:53:58 2011 -0700
fix: Misparsing config types for old tor versions
Queries of "GETINFO config/names" can provide documentation as an optional third argument. This only appears to happen for older tor versions (like 0.2.1.25). I was misparsing this, so the documentation was considered to be part of the argument type. --- src/cli/configPanel.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/cli/configPanel.py b/src/cli/configPanel.py index 7c1a62e..13e4343 100644 --- a/src/cli/configPanel.py +++ b/src/cli/configPanel.py @@ -203,9 +203,12 @@ class ConfigPanel(panel.Panel): configOptionLines = conn.getInfo("config/names", "").strip().split("\n")
for line in configOptionLines: - # lines are of the form "<option> <type>", like: + # lines are of the form "<option> <type>[ <documentation>]", like: # UseEntryGuards Boolean - confOption, confType = line.strip().split(" ", 1) + # documentation is aparently only in older versions (for instance, + # 0.2.1.25) + lineComp = line.strip().split(" ") + confOption, confType = lineComp[0], lineComp[1]
# skips private and virtual entries if not configured to show them if not self._config["features.config.state.showPrivateOptions"] and confOption.startswith("__"):
tor-commits@lists.torproject.org