diff --git a/src/eduid/vccs/server/hasher.py b/src/eduid/vccs/server/hasher.py index e998ed9de..b19505696 100644 --- a/src/eduid/vccs/server/hasher.py +++ b/src/eduid/vccs/server/hasher.py @@ -66,8 +66,12 @@ def unlock(self, password: str) -> None: self._yhsm.unlock(unhexlify(password)) def info(self) -> str: + # pyhsm.base.YHSM.info() returns bytes(?) ret: bytes = self._yhsm.info() - return ret.decode() + if isinstance(ret, bytes): + return ret.decode() + else: + return ret async def hmac_sha1(self, key_handle: int | None, data: bytes) -> bytes: """