forked from LBRYCommunity/lbry-sdk
convert buffer to string
This commit is contained in:
parent
076af7ef43
commit
b5ce948bc1
1 changed files with 7 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
import six
|
||||||
import json
|
import json
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
@ -16,6 +17,10 @@ from .transaction import Transaction
|
||||||
from .database import WalletDatabase # pylint: disable=unused-import
|
from .database import WalletDatabase # pylint: disable=unused-import
|
||||||
|
|
||||||
|
|
||||||
|
if six.PY3:
|
||||||
|
buffer = memoryview
|
||||||
|
|
||||||
|
|
||||||
class BackwardsCompatibleNetwork(object):
|
class BackwardsCompatibleNetwork(object):
|
||||||
def __init__(self, manager):
|
def __init__(self, manager):
|
||||||
self.manager = manager
|
self.manager = manager
|
||||||
|
@ -168,6 +173,8 @@ class LbryWalletManager(BaseWalletManager):
|
||||||
defer.returnValue(tx)
|
defer.returnValue(tx)
|
||||||
|
|
||||||
def _old_get_temp_claim_info(self, tx, txo, address, claim_dict, name, bid):
|
def _old_get_temp_claim_info(self, tx, txo, address, claim_dict, name, bid):
|
||||||
|
if isinstance(address, buffer):
|
||||||
|
address = str(address)
|
||||||
return {
|
return {
|
||||||
"claim_id": hexlify(tx.get_claim_id(txo.index)).decode(),
|
"claim_id": hexlify(tx.get_claim_id(txo.index)).decode(),
|
||||||
"name": name,
|
"name": name,
|
||||||
|
|
Loading…
Add table
Reference in a new issue