From e6f8d683e1c0efa0bd93378192c2a25e4a872a46 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 23 Apr 2021 21:14:41 +0200 Subject: [PATCH] utils: specify paremeters of enc_plmn() as Hexstr To prevent missunderstandings when using enc_plmn(), specify the input and return parameters as Hexstr. Change-Id: I57cf8e2de357650aef2a06fbffc7615ccb2a45b4 Related: OS#4963 --- pySim/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/utils.py b/pySim/utils.py index a177c569..fc803de3 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -134,7 +134,7 @@ def dec_iccid(ef:Hexstr) -> str: def enc_iccid(iccid:str) -> Hexstr: return swap_nibbles(rpad(iccid, 20)) -def enc_plmn(mcc, mnc): +def enc_plmn(mcc:Hexstr, mnc:Hexstr) -> Hexstr: """Converts integer MCC/MNC into 3 bytes for EF""" if len(mnc) == 2: mnc += "F" # pad to 3 digits if needed