We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8ae230 commit 3ea646fCopy full SHA for 3ea646f
espsecure/esp_hsm_sign/exceptions.py
@@ -5,7 +5,6 @@
5
from esptool.logger import log
6
7
from pkcs11.exceptions import (
8
- AlreadyInitialized,
9
AnotherUserAlreadyLoggedIn,
10
ArgumentsBad,
11
DeviceRemoved,
@@ -19,6 +18,14 @@
19
18
)
20
21
+try:
22
+ # AlreadyInitialized is not available since python-pkcs11 9.0, as multiple
23
+ # initializations are now supported.
24
+ from pkcs11.exceptions import AlreadyInitialized
25
+except ImportError:
26
+ AlreadyInitialized = None
27
+
28
29
def handle_exceptions(e, info=""):
30
exception_type = e.__class__
31
if exception_type == MechanismInvalid:
0 commit comments