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

Change subject: runtime: explain how file probing works
......................................................................

runtime: explain how file probing works

We use a trick to probe a file (that does not exist in the local file
model yet). Let's explain further how that works, in particular why we
do not have to upate any state if probing fails.

Change-Id: I2a8af73654251d105af8de1c17da53dfa10dc669
Related: OS#5418
---
M pySim/runtime.py
1 file changed, 20 insertions(+), 0 deletions(-)

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




diff --git a/pySim/runtime.py b/pySim/runtime.py
index 028bef1..1155433 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -256,6 +256,12 @@
                 "Cannot select unknown file by name %s, only hexadecimal 4 
digit FID is allowed" % fid)

         try:
+            # We access the card through the select_file method of the scc 
object.
+            # If we succeed, we know that the file exists on the card and we 
may
+            # proceed with creating a new CardEF object in the local file 
model at
+            # run time. In case the file does not exist on the card, we just 
abort.
+            # The state on the card (selected file/application) wont't be 
changed,
+            # so we do not have to update any state in that case.
             (data, sw) = self.scc.select_file(fid)
         except SwMatchError as swm:
             k = self.interpret_sw(swm.sw_actual)

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

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

Reply via email to