fix error reset on Select
This commit is contained in:
parent
7c52fa75c3
commit
bb9353b78a
|
@ -71,10 +71,12 @@ func (i *Initializer) Info() (*types.ApplicationInfo, error) {
|
||||||
|
|
||||||
logger.Info("select keycard applet")
|
logger.Info("select keycard applet")
|
||||||
err := cmdSet.Select()
|
err := cmdSet.Select()
|
||||||
if e, ok := err.(*apdu.ErrBadResponse); ok && e.Sw == globalplatform.SwFileNotFound {
|
if err != nil {
|
||||||
err = nil
|
if e, ok := err.(*apdu.ErrBadResponse); ok && e.Sw == globalplatform.SwFileNotFound {
|
||||||
} else {
|
err = nil
|
||||||
logger.Error("select failed", "error", err)
|
} else {
|
||||||
|
logger.Error("select failed", "error", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return cmdSet.ApplicationInfo, err
|
return cmdSet.ApplicationInfo, err
|
||||||
|
|
Loading…
Reference in New Issue