neels has uploaded this change for review.

View Change

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
---
M pySim/ts_31_102.py
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/90/43290/1
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index b354b32..843f7c4 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -335,7 +335,7 @@
"""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}

To view, visit change 43290. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia4e2356d0241d7a6ca399ba7e8be7f27ec836104
Gerrit-Change-Number: 43290
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>