working on issue for hashid being bytes on some versions

master
Kevin Froman 2018-04-26 19:04:35 -05:00
parent 9f4aef7465
commit 3cba6b30c7
No known key found for this signature in database
GPG Key ID: 0D414D0FE405B63B
1 changed files with 5 additions and 0 deletions

View File

@ -620,6 +620,11 @@ class Core:
if sign:
signature = self._crypto.edSign(data, self._crypto.privKey, encodeResult=True)
ourID = self._crypto.pubKeyHashID()
# Convert from bytes on some py versions?
try:
ourID = ourID.decode()
except AttributeError:
pass
metadata['id'] = ourID
metadata['sig'] = signature
metadata = json.dumps(metadata)