commit 48d9b843481973e8d5f193defdf6869c5f69a9cc Author: Damian Johnson atagar@torproject.org Date: Fri Feb 16 17:28:20 2018 -0800
Allow 'proto' lines to have blank values
Taking into account a small spec change...
https://gitweb.torproject.org/torspec.git/commit/?id=a8455f4 --- docs/change_log.rst | 1 + stem/descriptor/__init__.py | 3 +++ 2 files changed, 4 insertions(+)
diff --git a/docs/change_log.rst b/docs/change_log.rst index 5a209b43..4a5e927b 100644 --- a/docs/change_log.rst +++ b/docs/change_log.rst @@ -56,6 +56,7 @@ The following are only available within Stem's `git repository * `Fallback directory v2 support https://lists.torproject.org/pipermail/tor-dev/2017-December/012721.html`_, which adds *nickname* and *extrainfo* * Reduced maximum descriptors fetched by the remote module to match tor's new limit (:trac:`24743`) * Consensus **shared_randomness_*_reveal_count** attributes undocumented, and unavailable if retrieved before their corresponding shared_randomness_*_value attribute (:trac:`25046`) + * Allow 'proto' line to have blank values (:spec:`a8455f4`)
* **Website**
diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py index 93e2d702..d56b38b8 100644 --- a/stem/descriptor/__init__.py +++ b/stem/descriptor/__init__.py @@ -520,6 +520,9 @@ def _parse_protocol_line(keyword, attribute): k, v = entry.split('=', 1) versions = []
+ if not v: + continue + for subentry in v.split(','): if '-' in subentry: min_value, max_value = subentry.split('-', 1)
tor-commits@lists.torproject.org