mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
pySim.app: Properly reset card state after reading EID
The code had two problems: * the RESET was only performed in the successful case, but not if some exceptio was raised * the RESET was a low-level reset bypassing the RuntimeState, so the lchan.selected_file was stale afterwards Fixes: Change-Id Idc2ea1d9263f39b3dff403e1535a5e6c4e88b26f Change-Id: Ib23d3d5b58b456a25157a622c1010c81cd8b2213
This commit is contained in:
@@ -116,6 +116,7 @@ def init_card(sl: LinkBase) -> Tuple[RuntimeState, SimCardBase]:
|
||||
except SwMatchError:
|
||||
# has ISD-R but not a SGP.22/SGP.32 eUICC - maybe SGP.02?
|
||||
pass
|
||||
card.reset()
|
||||
finally:
|
||||
rs.reset()
|
||||
|
||||
return rs, card
|
||||
|
||||
Reference in New Issue
Block a user