From 9e0b7c7dc47113f6aa41f09d93cd0e838f5e9dee Mon Sep 17 00:00:00 2001 From: Markus Merklinger Date: Thu, 30 Nov 2023 10:17:49 +0100 Subject: [PATCH] Display value for type and mechanism on NetHSM get_key --- pynitrokey/cli/nethsm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pynitrokey/cli/nethsm.py b/pynitrokey/cli/nethsm.py index 42a82920..3e46bf43 100644 --- a/pynitrokey/cli/nethsm.py +++ b/pynitrokey/cli/nethsm.py @@ -524,9 +524,9 @@ def get_key(ctx: Context, key_id: str, public_key: bool) -> None: print(nethsm.get_key_public_key(key_id)) else: key = nethsm.get_key(key_id) - mechanisms = ", ".join([str(m) for m in key.mechanisms]) + mechanisms = ", ".join([str(m.value) for m in key.mechanisms]) print(f"Key {key_id} on NetHSM {nethsm.host}:") - print(f"Type: {key.type}") + print(f"Type: {key.type.value}") print(f"Mechanisms: {mechanisms}") print(f"Operations: {key.operations}") if key.tags: