sysmo_isim_sja2: call superclass methods with super()
Currently we call the superclass methods using the class name of the super class. Let's use super() instead.
This commit is contained in:
parent
6a6d59326f
commit
628ed33e2a
|
@ -149,7 +149,7 @@ class SYSMO_ISIMSJA2_FILE_EF_SIM_AUTH_KEY(SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY):
|
||||||
if content == None:
|
if content == None:
|
||||||
return
|
return
|
||||||
|
|
||||||
SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY.__init__(self, content)
|
super().__init__(content)
|
||||||
self.key = content[1:17]
|
self.key = content[1:17]
|
||||||
self.opc = content[17:33]
|
self.opc = content[17:33]
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ class SYSMO_ISIMSJA2_FILE_EF_SIM_AUTH_KEY(SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY):
|
||||||
dump = ""
|
dump = ""
|
||||||
pfx = " "
|
pfx = " "
|
||||||
|
|
||||||
dump += SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY.__str__(self)
|
dump += super().__str__()
|
||||||
|
|
||||||
if self.algo == SYSMO_ISIMSJA2_ALGO_MILENAGE:
|
if self.algo == SYSMO_ISIMSJA2_ALGO_MILENAGE:
|
||||||
dump += pfx + "Key: " + hexdump(self.key) + "\n"
|
dump += pfx + "Key: " + hexdump(self.key) + "\n"
|
||||||
|
@ -177,7 +177,7 @@ class SYSMO_ISIMSJA2_FILE_EF_SIM_AUTH_KEY(SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY):
|
||||||
|
|
||||||
|
|
||||||
def encode(self):
|
def encode(self):
|
||||||
out = SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY.encode(self)
|
out = super().encode()
|
||||||
out += self.key + self.opc
|
out += self.key + self.opc
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ class SYSMO_ISIMSJA2_FILE_EF_USIM_AUTH_KEY(SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY)
|
||||||
if content == None:
|
if content == None:
|
||||||
return
|
return
|
||||||
|
|
||||||
SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY.__init__(self, content)
|
super().__init__(content)
|
||||||
header = content[0]
|
header = content[0]
|
||||||
|
|
||||||
self.full_res = bool((header >> 6) & 1)
|
self.full_res = bool((header >> 6) & 1)
|
||||||
|
@ -209,7 +209,7 @@ class SYSMO_ISIMSJA2_FILE_EF_USIM_AUTH_KEY(SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY)
|
||||||
dump = ""
|
dump = ""
|
||||||
pfx = " "
|
pfx = " "
|
||||||
|
|
||||||
dump += SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY.__str__(self)
|
dump += super().__str__()
|
||||||
if self.full_res == True and self.ext_res == False:
|
if self.full_res == True and self.ext_res == False:
|
||||||
dump += pfx + "3G: Return full 8-byte RES\n"
|
dump += pfx + "3G: Return full 8-byte RES\n"
|
||||||
elif self.full_res == False and self.ext_res == False:
|
elif self.full_res == False and self.ext_res == False:
|
||||||
|
@ -238,7 +238,7 @@ class SYSMO_ISIMSJA2_FILE_EF_USIM_AUTH_KEY(SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY)
|
||||||
|
|
||||||
|
|
||||||
def encode(self):
|
def encode(self):
|
||||||
out = SYSMO_ISIMSJA2_FILE_EF_XSIM_AUTH_KEY.encode(self)
|
out = super().encode()
|
||||||
if self.full_res == True:
|
if self.full_res == True:
|
||||||
out[0] |= 1 << 6
|
out[0] |= 1 << 6
|
||||||
if self.ext_res == True:
|
if self.ext_res == True:
|
||||||
|
|
Loading…
Reference in New Issue