base64 fixes

master
Peter Šurda 2 years ago
parent d6e3721404
commit 33c5d5fc91
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
  1. 6
      autoresponder_mailing.py

@ -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…
Cancel
Save