diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 4ee6621a..1f46241b 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -389,7 +389,10 @@ class EF_SUCI_Calc_Info(TransparentEF): # remaining data holds Home Network Public Key Data Object hpkl = EF_SUCI_Calc_Info.HnetPubkeyList() hpkl.from_tlv(in_bytes[pos:]) - hnet_pubkey_list = self._compact_pubkey_list(hpkl.to_dict()['hnet_pubkey_list']) + + hnet_pubkey_list = [] + if hpkl.to_dict()['hnet_pubkey_list']: + hnet_pubkey_list = self._compact_pubkey_list(hpkl.to_dict()['hnet_pubkey_list']) return { 'prot_scheme_id_list': prot_scheme_id_list,