commit 97fad7b6f7b6113fdb3e5ca8925224901748a98c Author: Damian Johnson atagar@torproject.org Date: Sun May 13 15:46:58 2012 -0700
Citing ticket about negative cell-processed-cells values
Comment to explain why we're accepting negative values, and citing the related ticket. --- stem/descriptor/extrainfo_descriptor.py | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/stem/descriptor/extrainfo_descriptor.py b/stem/descriptor/extrainfo_descriptor.py index a08d389..1363579 100644 --- a/stem/descriptor/extrainfo_descriptor.py +++ b/stem/descriptor/extrainfo_descriptor.py @@ -480,6 +480,11 @@ class ExtraInfoDescriptor(stem.descriptor.Descriptor): if value: for entry in value.split(","): try: + # TODO: The description of the values sound like they should + # always be positive, but this is not always the case in + # practice... + # https://trac.torproject.org/projects/tor/ticket/5849 + entries.append(float(entry)) except ValueError: if validate: raise ValueError("Non-numeric entry in %s listing: %s" % (keyword, line))