summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamian Johnson <atagar@torproject.org>2015-03-11 08:06:57 -0700
committerDamian Johnson <atagar@torproject.org>2015-03-11 08:07:42 -0700
commitbc42f5d902b2df83e9701bd0ac75fd0c9d53c5b3 (patch)
treeb69abe17bd2ee0d5719e103753aa8c98eae92800
parent378bfaf32c2eda1e22d92c6b2bce67f973af25da (diff)
Error during hs descriptor decryption failures with python3
Oops, another spot where we need to do slice rather than indexing (since the later provides an int in python3). Caught by cyberpunks on... https://trac.torproject.org/projects/tor/ticket/15004#comment:18
-rw-r--r--stem/descriptor/hidden_service_descriptor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/stem/descriptor/hidden_service_descriptor.py b/stem/descriptor/hidden_service_descriptor.py
index 8c3ce7d6..b0a9551b 100644
--- a/stem/descriptor/hidden_service_descriptor.py
+++ b/stem/descriptor/hidden_service_descriptor.py
@@ -317,7 +317,7 @@ class HiddenServiceDescriptor(Descriptor):
try:
client_blocks = int(binascii.hexlify(content[1:2]), 16)
except ValueError:
- raise DecryptionFailure("When using basic auth the content should start with a number of blocks but wasn't a hex digit: %s" % binascii.hexlify(content[1]))
+ raise DecryptionFailure("When using basic auth the content should start with a number of blocks but wasn't a hex digit: %s" % binascii.hexlify(content[1:2]))
# parse the client id and encrypted session keys