Change in pysim[master]: utils: specify paremeters of enc_plmn() as Hexstr

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Mon May 3 14:19:41 UTC 2021


dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/23998 )

Change subject: utils: specify paremeters of enc_plmn() as Hexstr
......................................................................

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

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/pySim/utils.py b/pySim/utils.py
index a177c56..fc803de 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -134,7 +134,7 @@
 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

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23998
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I57cf8e2de357650aef2a06fbffc7615ccb2a45b4
Gerrit-Change-Number: 23998
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210503/1a3914ca/attachment.htm>


More information about the gerrit-log mailing list