Rev4016, Add ad test Python 3.4 compatibility

This commit is contained in:
shortcutme 2019-03-21 02:22:22 +01:00
parent 1da6c8c84e
commit 60405bf222
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
5 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,7 @@
import logging
import json
import time
import binascii
import gevent
@ -53,7 +54,7 @@ class User(object):
self.delayed_save_thread = gevent.spawn_later(5, self.save)
def getAddressAuthIndex(self, address):
return int(address.encode("ascii").hex(), 16)
return int(binascii.hexlify(address.encode()), 16)
@util.Noparallel()
def generateAuthAddress(self, address):