pySim-read: MISDN is not mandatory

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut
2013-07-18 10:36:51 +02:00
parent 7be92ff5d2
commit 9f13897408

View File

@@ -124,15 +124,18 @@ if __name__ == '__main__':
print("ACC: Can't read, response code = %s" % (sw,)) print("ACC: Can't read, response code = %s" % (sw,))
# EF.MSISDN # EF.MSISDN
# print(scc.record_size(['3f00', '7f10', '6f40'])) try:
(res, sw) = scc.read_record(['3f00', '7f10', '6f40'], 1) # print(scc.record_size(['3f00', '7f10', '6f40']))
if sw == '9000': (res, sw) = scc.read_record(['3f00', '7f10', '6f40'], 1)
if res[1] != 'f': if sw == '9000':
print("MSISDN: %s" % (res,)) if res[1] != 'f':
print("MSISDN: %s" % (res,))
else:
print("MSISDN: Not available")
else: else:
print("MSISDN: Not available") print("MSISDN: Can't read, response code = %s" % (sw,))
else: except:
print("MSISDN: Can't read, response code = %s" % (sw,)) print "MSISDN: Can't read. Probably not existing file"
# Done for this card and maybe for everything ? # Done for this card and maybe for everything ?
print "Done !\n" print "Done !\n"