commit 2b4ec7c1c6e1e1848ca3080d9da41cb02d51b0ea Author: Damian Johnson atagar@torproject.org Date: Sun Aug 19 18:11:49 2012 -0700
Error due to KEYWORD_LINE regex change
The KEYWORD_LINE regex fix a few commits back broke one of the server descriptor unit tests because it caused lines with only a keyword (ex. "platform") to have a None value. Before the regex change they had an empty string value.
I'm not really sure which is proper, but for now keeping the prior behavior. --- stem/descriptor/__init__.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py index 74b538c..fb81237 100644 --- a/stem/descriptor/__init__.py +++ b/stem/descriptor/__init__.py @@ -387,6 +387,7 @@ def _get_descriptor_components(raw_contents, validate, extra_keywords): raise ValueError("Line contains invalid characters: %s" % line)
keyword, value = line_match.groups() + if value is None: value = ''
if not first_keyword: first_keyword = keyword last_keyword = keyword