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):
|
||||
"""generate random address if there isn't one"""
|
||||
try:
|
||||
addresses = json.loads(self.api.listAddresses2())['addresses']
|
||||
addresses = json.loads(self.api.listAddresses())['addresses']
|
||||
if addresses:
|
||||
return
|
||||
except KeyError:
|
||||
pass
|
||||
self.api.createRandomAddress(base64.b64encode(self.label))
|
||||
self.api.createRandomAddress(base64.b64encode(self.label.encode()))
|
||||
|
||||
def loop(self):
|
||||
"""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
|
||||
|
||||
while True:
|
||||
|
|
Loading…
Reference in New Issue
Block a user