From 2128cd3c5b692153c7b56ce2a8eeff22b140c026 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 --- 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 2f7b9453..265e7905 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -327,7 +327,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}