base64 fixes
This commit is contained in:
parent
d6e3721404
commit
33c5d5fc91
|
@ -31,16 +31,16 @@ class BitmessageAutoresponder(): # pylint: disable=too-many-locals
|
||||||
def init_address(self):
|
def init_address(self):
|
||||||
"""generate random address if there isn't one"""
|
"""generate random address if there isn't one"""
|
||||||
try:
|
try:
|
||||||
addresses = json.loads(self.api.listAddresses2())['addresses']
|
addresses = json.loads(self.api.listAddresses())['addresses']
|
||||||
if addresses:
|
if addresses:
|
||||||
return
|
return
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
self.api.createRandomAddress(base64.b64encode(self.label))
|
self.api.createRandomAddress(base64.b64encode(self.label.encode()))
|
||||||
|
|
||||||
def loop(self):
|
def loop(self):
|
||||||
"""Main loop"""
|
"""Main loop"""
|
||||||
for i in json.loads(self.api.listAddresses2())['addresses']:
|
for i in json.loads(self.api.listAddresses())['addresses']:
|
||||||
self.addresses[i['address']] = True
|
self.addresses[i['address']] = True
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user