From d32ba8c1a17d2b244bc201b2c0cbcda4f7a1d7c1 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 27 Aug 2026 21:04:40 +0200 Subject: [PATCH] Fixed inconsistency against advertised return type --- RNS/Identity.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/RNS/Identity.py b/RNS/Identity.py index 64720151..2f5e4a1e 100644 --- a/RNS/Identity.py +++ b/RNS/Identity.py @@ -759,9 +759,7 @@ class Identity: return True except Exception as e: - raise e - RNS.log("Failed to load identity key", RNS.LOG_ERROR) - RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR) + RNS.log(f"Failed to load identity key, the contained exception was: {e}", RNS.LOG_ERROR) return False def load_public_key(self, pub_bytes): @@ -779,8 +777,12 @@ class Identity: self.sig_pub = Ed25519PublicKey.from_public_bytes(self.sig_pub_bytes) self.update_hashes() + + return True + except Exception as e: - RNS.log("Error while loading public key, the contained exception was: "+str(e), RNS.LOG_ERROR) + RNS.log(f"Error while loading public key, the contained exception was: {e}", RNS.LOG_ERROR) + return False def update_hashes(self): self.hash = Identity.truncated_hash(self.get_public_key())