diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2020-02-27 01:49:51 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2020-02-27 02:20:47 +0700 |
commit | 9664b2e7fc7e9cd73e57c58eabf55219d98f287d (patch) | |
tree | bd07a7b2d558da8b11d20426eb26a0be28606fd8 | |
parent | edf873d04a0951b44598f781cd962e08476d7d0a (diff) |
cards: Python 3 fix: use the floor division operator //
Change-Id: I21de34133dbc5d859a5b744adc74f706ba2f0dd8
-rw-r--r-- | pySim/cards.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pySim/cards.py b/pySim/cards.py index 053ea98..ec2724c 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -77,10 +77,10 @@ class Card(object): """ # get size and write EF.HPLMNwAcT data = self._scc.read_binary(EF['HPLMNwAcT'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech - data, sw = self._scc.update_binary(EF['HPLMNwAcT'], content + 'ffffff0000' * (size/5-1)) + data, sw = self._scc.update_binary(EF['HPLMNwAcT'], content + 'ffffff0000' * (size // 5 - 1)) return sw def update_oplmn_act(self, mcc, mnc, access_tech='FFFF'): @@ -92,7 +92,7 @@ class Card(object): size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech - data, sw = self._scc.update_binary(EF['OPLMNwAcT'], content + 'ffffff0000' * (size/5-1)) + data, sw = self._scc.update_binary(EF['OPLMNwAcT'], content + 'ffffff0000' * (size // 5 - 1)) return sw def update_plmn_act(self, mcc, mnc, access_tech='FFFF'): @@ -104,7 +104,7 @@ class Card(object): size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech - data, sw = self._scc.update_binary(EF['PLMNwAcT'], content + 'ffffff0000' * (size/5-1)) + data, sw = self._scc.update_binary(EF['PLMNwAcT'], content + 'ffffff0000' * (size // 5 - 1)) return sw def update_plmnsel(self, mcc, mnc): |