From 3cba6b30c7a751e0f9c9e86379d450172b57626c Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 26 Apr 2018 19:04:35 -0500 Subject: [PATCH] working on issue for hashid being bytes on some versions --- onionr/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/onionr/core.py b/onionr/core.py index fc9065e8..7b94924a 100644 --- a/onionr/core.py +++ b/onionr/core.py @@ -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)