laforge has uploaded this change for review.
pySim-trace: Support SELECT with empty response body
If the modem/UE doesn't ask for the FCP to be returned, a SELECT
can exit with 9000 and no response body. Don't crash in that case.
Change-Id: I66788717bec921bc54575e60f3f81adc80584dbc
---
M pySim/apdu/ts_102_221.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/62/28762/1
diff --git a/pySim/apdu/ts_102_221.py b/pySim/apdu/ts_102_221.py
index 9ecc2c9..e5455d0 100644
--- a/pySim/apdu/ts_102_221.py
+++ b/pySim/apdu/ts_102_221.py
@@ -95,7 +95,9 @@
# decode the SELECT response
if self.successful:
self.file = lchan.selected_file
- return lchan.selected_file.decode_select_response(self.rsp_dict['body'])
+ if 'body' in self.rsp_dict:
+ # not every SELECT is asking for the FCP in response...
+ return lchan.selected_file.decode_select_response(self.rsp_dict['body'])
return None
To view, visit change 28762. To unsubscribe, or for help writing mail filters, visit settings.