working on issue for hashid being bytes on some versions

This commit is contained in:
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

View File

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