commit 407ed1cef0444290a7ab4cb80db460727cddd4b0 Author: Damian Johnson atagar@torproject.org Date: Sat Jan 20 12:12:59 2018 -0800
Just provide bytes for address errors
Spec doesn't specify what form errors take and I don't have any examples. Just providing the bytes the socket gives us. We might change the value in the future to be something more useful. --- stem/client/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/stem/client/__init__.py b/stem/client/__init__.py index b0da7aae..7705e59d 100644 --- a/stem/client/__init__.py +++ b/stem/client/__init__.py @@ -266,7 +266,12 @@ class Address(Field): self.value = ':'.join(['%04x' % Size.SHORT.unpack(value[i * 2:(i + 1) * 2]) for i in range(8)]) self.value_bin = value else: - self.value, self.value_bin = None, None # TODO: implement + # The spec doesn't really tell us what form to expect errors to be. For + # now just leaving the value unset so we can fill it in later when we + # know what would be most useful. + + self.value = None + self.value_bin = value
@staticmethod def pop(content):
tor-commits@lists.torproject.org