mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 10:33:15 +03:00
Avoid catching InvalidPinError as ValueError.
This commit is contained in:
parent
63d4c58cfe
commit
33eccbb53c
@ -12,6 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from yubikit.core import InvalidPinError
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
@ -123,6 +124,8 @@ class RpcNode:
|
|||||||
except ChildResetException as e:
|
except ChildResetException as e:
|
||||||
self._close_child()
|
self._close_child()
|
||||||
raise StateResetException(e.message, traversed)
|
raise StateResetException(e.message, traversed)
|
||||||
|
except InvalidPinError:
|
||||||
|
raise # Prevent catching this as a ValueError below
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise InvalidParametersException(e)
|
raise InvalidParametersException(e)
|
||||||
raise NoSuchActionException(action)
|
raise NoSuchActionException(action)
|
||||||
|
@ -21,13 +21,12 @@ from .base import (
|
|||||||
TimeoutException,
|
TimeoutException,
|
||||||
AuthRequiredException,
|
AuthRequiredException,
|
||||||
)
|
)
|
||||||
from yubikit.core import NotSupportedError, BadResponseError
|
from yubikit.core import NotSupportedError, BadResponseError, InvalidPinError
|
||||||
from yubikit.core.smartcard import ApduError, SW
|
from yubikit.core.smartcard import ApduError, SW
|
||||||
from yubikit.piv import (
|
from yubikit.piv import (
|
||||||
PivSession,
|
PivSession,
|
||||||
OBJECT_ID,
|
OBJECT_ID,
|
||||||
MANAGEMENT_KEY_TYPE,
|
MANAGEMENT_KEY_TYPE,
|
||||||
InvalidPinError,
|
|
||||||
SLOT,
|
SLOT,
|
||||||
require_version,
|
require_version,
|
||||||
KEY_TYPE,
|
KEY_TYPE,
|
||||||
|
Loading…
Reference in New Issue
Block a user