From f898c28284428e0c561a47679c0d600afae86973 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 14 Oct 2021 16:13:23 +0200 Subject: [PATCH] 51.011: Fix EF_SST decoder for services > table description Before: EXCEPTION of type 'KeyError' occurred with message: '60' After: "60": { "description": null, "allocated": false, "activated": false } Change-Id: Ic089f9632a936bdbedd2344442678c5bf9797713 --- pySim/ts_51_011.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 65be06ad..70629f7e 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -513,7 +513,7 @@ class EF_ServiceTable(TransparentEF): bit_offset = (i % 4) * 2 bits = (byte >> bit_offset) & 3 ret[service_nr] = { - 'description': self.table[service_nr] or None, + 'description': self.table[service_nr] if service_nr in self.table else None, 'allocated': True if bits & 1 else False, 'activated': True if bits & 2 else False, }