commit d9a924b423bbbd8de7f56cc7a086d7bd9abd19ee Author: Damian Johnson atagar@torproject.org Date: Sun Oct 29 13:28:04 2017 -0700
NewConsensus consensus_content attribute not set
Oops, documented it but didn't set it. --- stem/response/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stem/response/events.py b/stem/response/events.py index 256ec30e..f1fc02dd 100644 --- a/stem/response/events.py +++ b/stem/response/events.py @@ -824,14 +824,14 @@ class NewConsensusEvent(Event): _VERSION_ADDED = stem.version.Requirement.EVENT_NEWCONSENSUS
def _parse(self): - content = str(self).lstrip('NEWCONSENSUS\n').rstrip('\nOK') + self.consensus_content = str(self).lstrip('NEWCONSENSUS\n').rstrip('\nOK')
# TODO: For stem 2.0.0 consider changing 'desc' to 'descriptors' to match # our other events.
if PARSE_NEWCONSENSUS_EVENTS: self.desc = list(stem.descriptor.router_status_entry._parse_file( - io.BytesIO(str_tools._to_bytes(content)), + io.BytesIO(str_tools._to_bytes(self.consensus_content)), False, entry_class = stem.descriptor.router_status_entry.RouterStatusEntryV3, ))
tor-commits@lists.torproject.org