From 6e3c9d9c1a737d6d37f8b91f62a30528c3428a69 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 22 Apr 2026 16:57:04 +0200 Subject: [PATCH] ts_31_102.py: EF_SUCI_Calc_Info(TransparentEF): fix len test while len(foo): throws an exception when foo == None. Instead doing while foo: fixes a problem when reading in empty SUCI calc info data, e.g. from TS48v7.0_SAIP2.3_BERTLV_SUCI_NoRAMRFM.der. Change-Id: Ia4e2356d0241d7a6ca399ba7e8be7f27ec836104 Jenkins: skip-card-test --- pySim/ts_31_102.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index b354b328..843f7c4f 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -335,7 +335,7 @@ class EF_SUCI_Calc_Info(TransparentEF): """conversion method to generate list of {hnet_pubkey_identifier, hnet_pubkey} dicts from flat [{hnet_pubkey_identifier: }, {net_pubkey: }, ...] list""" out = [] - while len(l): + while l: a = l.pop(0) b = l.pop(0) z = {**a, **b}