diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2019-09-12 12:52:43 +0200 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2019-09-13 11:04:13 +0200 |
commit | be069e26ae6e6d0e6aaa50498f274bddebe8e99e (patch) | |
tree | 6a59cf6772678cdea821c109566f106505ccb19d /pySim/utils.py | |
parent | 196b08cdfdd6b5ee8c75a86f510514b99dd383d2 (diff) |
cards: use string representation for MNC/MCC
At the moment MNC and MCC are represented as integer numbers inside the
parameter array while all other parameters are represented as strings.
Lets use strings for MNC/MCC as well to simplify the parameter handling.
We will also not loose the length information in case of leading zeros.
Change-Id: Ia2333921a4863f0f26ee923ca796e62ec5e2d59a
Diffstat (limited to 'pySim/utils.py')
-rw-r--r-- | pySim/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pySim/utils.py b/pySim/utils.py index 65f10c5..a68af0a 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -98,7 +98,7 @@ def enc_iccid(iccid): def enc_plmn(mcc, mnc): """Converts integer MCC/MNC into 3 bytes for EF""" - return swap_nibbles(lpad('%d' % mcc, 3) + lpad('%d' % mnc, 3)) + return swap_nibbles(lpad('%d' % int(mcc), 3) + lpad('%d' % int(mnc), 3)) def dec_spn(ef): byte1 = int(ef[0:2]) |