aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-05-05 12:18:41 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2021-05-21 16:46:00 +0200
commitfc5f28db3b19820ede607a1ddcda36d1159a60a8 (patch)
tree6e331598efa34d61881cea8a5eef04fe7e24dde3
parente2c59a8b912be91d1d3a12b4cab0bb6e7cae38a3 (diff)
cards: populate name property in Card, UsimCard and IsimCard
Even though Card, UsimCard and IsimCard are abstract classes which are normally only used to inherit from mit may make sense to pre-populate the name property with some meaningful value. Change-Id: Id643e1f83718aea073e7200aecbf2db2def8652f
-rw-r--r--pySim/cards.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pySim/cards.py b/pySim/cards.py
index dcba26c..7744c7a 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -34,6 +34,8 @@ from pytlv.TLV import *
class Card(object):
+ name = 'SIM'
+
def __init__(self, scc):
self._scc = scc
self._adm_chv_num = 4
@@ -291,6 +293,9 @@ class Card(object):
self._scc.update_record(ef, rec_no, "ff" * len, force_len=False, verify=True)
class UsimCard(Card):
+
+ name = 'USIM'
+
def __init__(self, ssc):
super(UsimCard, self).__init__(ssc)
@@ -361,6 +366,9 @@ class UsimCard(Card):
return sw
class IsimCard(Card):
+
+ name = 'ISIM'
+
def __init__(self, ssc):
super(IsimCard, self).__init__(ssc)