dexter has uploaded this change for review.
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(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/51/35251/1
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 change 35251. To unsubscribe, or for help writing mail filters, visit settings.