aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2022-05-20 15:19:25 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2022-05-20 15:19:25 +0200
commit5dfcab54ba62c9cc2983c116829b1075e80f1f61 (patch)
tree51bcb953c065e0a8208039b41b65c9769674ad84
parent0077008963c5d76d0cfed23cfba4d4a5c589b35f (diff)
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
-rw-r--r--pySim/filesystem.py5
1 files changed, 3 insertions, 2 deletions
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 @@ 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