commit 0d478c57866c868c63be50714887c1b1535fbd0f Author: Damian Johnson atagar@torproject.org Date: Fri Apr 13 20:11:37 2012 -0700
Removing deprecation warnings for server descriptor fields
The read/write-history and eventdns server descriptor fields are part of the spec but no longer used. I was logging a notice that they're deprecated when we encountered them, but this is neither useful nor does it make sense. We might be parsing old metrics archives where those attributes are perfectly valid.
Integ tests include a check that those aren't seen in the wild, which is what I really care about. --- stem/descriptor/server_descriptor.py | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py index dfdde30..0a6cd29 100644 --- a/stem/descriptor/server_descriptor.py +++ b/stem/descriptor/server_descriptor.py @@ -26,7 +26,6 @@ import stem.descriptor import stem.version import stem.util.connection import stem.util.tor_tools -import stem.util.log as log
KEYWORD_CHAR = "a-zA-Z0-9-" WHITESPACE = " \t" @@ -473,13 +472,10 @@ class ServerDescriptorV3(stem.descriptor.Descriptor): elif keyword == "family": self.family = value.split(" ") elif keyword == "read-history": - log.info("Read an unexpected 'read-history' line in a v3 server descriptor. These should only appear in extra-info. line: %s" % line) self.read_history = value elif keyword == "write-history": - log.info("Read an unexpected 'write-history' line in a v3 server descriptor. These should only appear in extra-info. line: %s" % line) self.write_history = value elif keyword == "eventdns": - log.info("Read an unexpected 'eventdns' line in a v3 server descriptor. These should be deprecated. line: %s" % line) self.eventdns = value == "1" else: self._unrecognized_lines.append(line)
tor-commits@lists.torproject.org