aboutsummaryrefslogtreecommitdiffstats
path: root/pySim
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2018-06-15 07:42:48 +0200
committerHarald Welte <laforge@gnumonks.org>2019-08-28 23:19:57 +0200
commit67acdbc817bbfa542d27435bc3ed8d6554c4e1a4 (patch)
treef33e0fda87ed4e816d9113917d0ee04d23c9702d /pySim
parent35a96edb0dc446ed1e09a932c8f41e748f571c19 (diff)
Make programming OPC optional
Diffstat (limited to 'pySim')
-rw-r--r--pySim/cards.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pySim/cards.py b/pySim/cards.py
index a341b71..cb42d83 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -582,9 +582,9 @@ class SysmoUSIMSJS1(Card):
data, sw = self._scc.update_binary('00FF', p['ki'])
# set OPc in proprietary file
- content = "01" + p['opc']
- data, sw = self._scc.update_binary('00F7', content)
-
+ if 'opc' in p:
+ content = "01" + p['opc']
+ data, sw = self._scc.update_binary('00F7', content)
# write EF.IMSI
data, sw = self._scc.update_binary('6f07', enc_imsi(p['imsi']))