diff options
author | herlesupreeth <herlesupreeth@gmail.com> | 2020-09-29 10:03:06 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-10-03 07:36:58 +0000 |
commit | f8232db3276ddb5a94233bc43afdf176611fd3b1 (patch) | |
tree | 2193a1e5afcf6729c0a981c9fdccab0503f1d0ed /pySim-read.py | |
parent | 5d0a30c19c26418c427a12e702fc3c2636069cee (diff) |
Move reading of ePDG Id to generic USIM class
Change-Id: I716acb994430db3d4e56fea072f8dc2cebeaba84
Diffstat (limited to 'pySim-read.py')
-rwxr-xr-x | pySim-read.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pySim-read.py b/pySim-read.py index 2ca0557..a4f15f8 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -267,12 +267,12 @@ if __name__ == '__main__': #EF.ePDGId - Home ePDG Identifier try: - (res, sw) = card.read_binary(EF_USIM_ADF_map['ePDGId']) - if sw == '9000': - content = dec_epdgid(res) - print("ePDGId:\n%s" % (len(content) and content or '\tNot available\n',)) - else: - print("ePDGId: Can't read, response code = %s" % (sw,)) + if card.file_exists(EF_USIM_ADF_map['ePDGId']): + (res, sw) = card.read_epdgid() + if sw == '9000': + print("ePDGId:\n%s" % (len(res) and res or '\tNot available\n',)) + else: + print("ePDGId: Can't read, response code = %s" % (sw,)) except Exception as e: print("ePDGId: Can't read file -- " + str(e)) |