]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
Unhexify the returned hashes from the AptPackages lookup.
authorCameron Dale <camrdale@gmail.com>
Mon, 7 Jan 2008 05:06:48 +0000 (21:06 -0800)
committerCameron Dale <camrdale@gmail.com>
Mon, 7 Jan 2008 05:06:48 +0000 (21:06 -0800)
apt_dht/apt_dht.py

index e9b5df30a8928e45cc60ea257676a43ed540c49b..169bf20154b2456466808a850e822c27f4a0579a 100644 (file)
@@ -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):