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
|
||||
# limitations under the License.
|
||||
|
||||
from yubikit.core import InvalidPinError
|
||||
from functools import partial
|
||||
|
||||
import logging
|
||||
@ -123,6 +124,8 @@ class RpcNode:
|
||||
except ChildResetException as e:
|
||||
self._close_child()
|
||||
raise StateResetException(e.message, traversed)
|
||||
except InvalidPinError:
|
||||
raise # Prevent catching this as a ValueError below
|
||||
except ValueError as e:
|
||||
raise InvalidParametersException(e)
|
||||
raise NoSuchActionException(action)
|
||||
|
@ -21,13 +21,12 @@ from .base import (
|
||||
TimeoutException,
|
||||
AuthRequiredException,
|
||||
)
|
||||
from yubikit.core import NotSupportedError, BadResponseError
|
||||
from yubikit.core import NotSupportedError, BadResponseError, InvalidPinError
|
||||
from yubikit.core.smartcard import ApduError, SW
|
||||
from yubikit.piv import (
|
||||
PivSession,
|
||||
OBJECT_ID,
|
||||
MANAGEMENT_KEY_TYPE,
|
||||
InvalidPinError,
|
||||
SLOT,
|
||||
require_version,
|
||||
KEY_TYPE,
|
||||
|
Loading…
Reference in New Issue
Block a user