From 6bf528fdcd7548348200b934268625d48f0d4b29 Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Sun, 6 Jan 2008 21:06:48 -0800 Subject: [PATCH] Unhexify the returned hashes from the AptPackages lookup. --- apt_dht/apt_dht.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apt_dht/apt_dht.py b/apt_dht/apt_dht.py index e9b5df3..169bf20 100644 --- a/apt_dht/apt_dht.py +++ b/apt_dht/apt_dht.py @@ -1,4 +1,6 @@ +from binascii import a2b_hex + from twisted.internet import defer from twisted.web2 import server, http, http_headers from twisted.python import log @@ -55,7 +57,7 @@ class AptDHT: else: log.msg('Found hash %s for %s' % (hash, path)) # Lookup hash from DHT - lookupDefer = self.dht.getValue(hash) + lookupDefer = self.dht.getValue(a2b_hex(hash)) lookupDefer.addCallback(self.lookupHash_done, hash, size, path, d) def lookupHash_done(self, locations, hash, size, path, d): -- 2.39.5