correct TypeError: Strings must be encoded before hashing in node.py
This commit is contained in:
parent
d5d7a45488
commit
bb9f6c3a8b
@ -232,7 +232,7 @@ class Node:
|
||||
error = True
|
||||
if pubkey:
|
||||
logger.debug("read friend's public key: %s" % pubkey )
|
||||
uid = str(hashlib.sha224(pubkey).hexdigest())
|
||||
uid = str(hashlib.sha224(pubkey.encode(encoding = 'UTF-8', errors = 'strict')).hexdigest())
|
||||
try:
|
||||
address = re.search("address\s*=\s*(.*)", friendinfo).group(1)
|
||||
except AttributeError:
|
||||
|
Loading…
Reference in New Issue
Block a user