laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/38053?usp=email )

Change subject: pySim.app: Properly reset card state after reading EID
......................................................................

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
---
M pySim/app.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  dexter: Looks good to me, approved




diff --git a/pySim/app.py b/pySim/app.py
index 5525cd1..5a93f98 100644
--- a/pySim/app.py
+++ b/pySim/app.py
@@ -116,6 +116,7 @@
         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

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38053?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib23d3d5b58b456a25157a622c1010c81cd8b2213
Gerrit-Change-Number: 38053
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>

Reply via email to