dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/28170 )
Change subject: filesystem: also return the encoded FCP from probe_file ......................................................................
filesystem: also return the encoded FCP from probe_file
The method probe_file returns the decoded FCP after it managed to successfully probe the file. Lets also return the encoded FCP string, as it is needed by the caller.
Change-Id: Ia5659e106fb0d6fb8b77506a10eba309e764723e --- M pySim/filesystem.py 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/70/28170/1
diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 5bbd57b..7c5d49a 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -1402,7 +1402,7 @@
self.selected_file.add_files([f]) self.selected_file = f - return select_resp + return select_resp, data
def _select_pre(self, cmd_app): # unregister commands of old file @@ -1487,7 +1487,8 @@ raise RuntimeError("%s: %s - %s" % (swm.sw_actual, k[0], k[1])) select_resp = f.decode_select_response(data) else: - select_resp = self.probe_file(name, cmd_app) + (select_resp, data) = self.probe_file(name, cmd_app) + # store the raw + decoded FCP for later reference self.selected_file_fcp_hex = data self.selected_file_fcp = select_resp