py2->py3 unhexlify()

This commit is contained in:
Lex Berezhny 2018-07-27 20:31:15 -04:00 committed by Jack Robison
parent 923ed80fcf
commit 16024c95aa
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -1,5 +1,6 @@
import logging import logging
import os import os
from binascii import unhexlify
from sqlite3 import IntegrityError from sqlite3 import IntegrityError
from twisted.internet import threads, defer from twisted.internet import threads, defer
from lbrynet.blob.blob_file import BlobFile from lbrynet.blob.blob_file import BlobFile
@ -60,7 +61,7 @@ class DiskBlobManager:
blob.blob_hash, blob.length, next_announce_time, should_announce blob.blob_hash, blob.length, next_announce_time, should_announce
) )
if self._node_datastore is not None: if self._node_datastore is not None:
self._node_datastore.completed_blobs.add(blob.blob_hash.decode('hex')) self._node_datastore.completed_blobs.add(unhexlify(blob.blob_hash))
def completed_blobs(self, blobhashes_to_check): def completed_blobs(self, blobhashes_to_check):
return self._completed_blobs(blobhashes_to_check) return self._completed_blobs(blobhashes_to_check)