From 6b8eedc50112ef9ea731d83f945179b03c6f89b2 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 1 Jun 2022 18:10:04 +0200 Subject: [PATCH] filesystem: also return the encoded FCP from probe_file he 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 --- pySim/filesystem.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 5bbd57b0..7c5d49aa 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -1402,7 +1402,7 @@ class RuntimeState(object): 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 @@ class RuntimeState(object): 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