laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35723?usp=email )
Change subject: runtime: Reset selected_file_fcp[_hex] if SELECT returns no data ......................................................................
runtime: Reset selected_file_fcp[_hex] if SELECT returns no data
In case SELECT doesn't return any response data, we must reset the lchan.selected_file_fcp* members to None to prevent pySim-shell preventing stale data from the previously selected file.
Change-Id: Ia04b8634e328e604e8df7e8d59b7fd532242d2ca --- M pySim/runtime.py 1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/35723/1
diff --git a/pySim/runtime.py b/pySim/runtime.py index f836ec8..3aeaab1 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -304,6 +304,9 @@ if select_resp_data: self.selected_file_fcp_hex = select_resp_data self.selected_file_fcp = self.selected_file.decode_select_response(select_resp_data) + else: + self.selected_file_fcp_hex = None + self.selected_file_fcp = None
# register commands of new file if cmd_app and self.selected_file.shell_commands: