dexter has uploaded this change for review. (
https://gerrit.osmocom.org/c/pysim/+/41873?usp=email )
Change subject: esim/http_json_api: add missing check
......................................................................
esim/http_json_api: add missing check
The line actual_sec = func_ex_status.get('statusCodeData', None) suggests
that 'statusCodeData' may be None under normal circumstances. So let's guard
sec.update(actual_sec) so that we won't run into an exception in case
'statusCodeData' is not in func_ex_status.
Related: SYS#7825
Change-Id: I8a1a3cd5e029dba4a3aec1a64702e19b0d694ae2
---
M pySim/esim/http_json_api.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/73/41873/1
diff --git a/pySim/esim/http_json_api.py b/pySim/esim/http_json_api.py
index 8324bb9..bb41df3 100644
--- a/pySim/esim/http_json_api.py
+++ b/pySim/esim/http_json_api.py
@@ -149,7 +149,8 @@
'message': None,
}
actual_sec = func_ex_status.get('statusCodeData', None)
- sec.update(actual_sec)
+ if actual_sec:
+ sec.update(actual_sec)
self.subject_code = sec['subjectCode']
self.reason_code = sec['reasonCode']
self.subject_id = sec['subjectIdentifier']
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41873?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I8a1a3cd5e029dba4a3aec1a64702e19b0d694ae2
Gerrit-Change-Number: 41873
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>