Change in pysim[master]: pySim-read: Print exception when reading of EF.MSISDN fails
dexter has submitted this change and it was merged. ( https://gerrit.osmocom.org/9968 ) Change subject: pySim-read: Print exception when reading of EF.MSISDN fails .. pySim-read: Print exception when reading of EF.MSISDN fails At the moment the exception is catched, but there is only a vague error message printed. However, the exception string usually tells us the status word, so it is very valuable to see it. Lets make sure that the exception string is printed here. Change-Id: Icb30470b1c0eee6a15fc028da820e92bf9ded27a --- M pySim-read.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved dexter: Verified diff --git a/pySim-read.py b/pySim-read.py index 5ca39ee..f55b256 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -134,8 +134,8 @@ print("MSISDN: Not available") else: print("MSISDN: Can't read, response code = %s" % (sw,)) - except: - print "MSISDN: Can't read. Probably not existing file" + except Exception as e: + print "MSISDN: Can't read file -- " + str(e) # Done for this card and maybe for everything ? print "Done !\n" -- To view, visit https://gerrit.osmocom.org/9968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icb30470b1c0eee6a15fc028da820e92bf9ded27a Gerrit-Change-Number: 9968 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: dexter
Change in pysim[master]: pySim-read: Print exception when reading of EF.MSISDN fails
dexter has posted comments on this change. ( https://gerrit.osmocom.org/9968 ) Change subject: pySim-read: Print exception when reading of EF.MSISDN fails .. Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/9968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icb30470b1c0eee6a15fc028da820e92bf9ded27a Gerrit-Change-Number: 9968 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: dexter Gerrit-Comment-Date: Fri, 13 Jul 2018 08:56:41 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in pysim[master]: pySim-read: Print exception when reading of EF.MSISDN fails
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/9968 ) Change subject: pySim-read: Print exception when reading of EF.MSISDN fails .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/9968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icb30470b1c0eee6a15fc028da820e92bf9ded27a Gerrit-Change-Number: 9968 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Comment-Date: Thu, 12 Jul 2018 18:45:42 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in pysim[master]: pySim-read: Print exception when reading of EF.MSISDN fails
dexter has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/9968 ) Change subject: pySim-read: Print exception when reading of EF.MSISDN fails .. pySim-read: Print exception when reading of EF.MSISDN fails At the moment the exception is catched, but there is only a vague error message printed. However, the exception string usually tells us the status word, so it is very valuable to see it. Lets make sure that the exception string is printed here. Change-Id: Icb30470b1c0eee6a15fc028da820e92bf9ded27a --- M pySim-read.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/68/9968/2 -- To view, visit https://gerrit.osmocom.org/9968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icb30470b1c0eee6a15fc028da820e92bf9ded27a Gerrit-Change-Number: 9968 Gerrit-PatchSet: 2 Gerrit-Owner: dexter
Change in pysim[master]: pySim-read: Print exception when reading of EF.MSISDN fails
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/9968 Change subject: pySim-read: Print exception when reading of EF.MSISDN fails .. pySim-read: Print exception when reading of EF.MSISDN fails At the moment the exception is catched, but there is only a vague error message printed. However, the exception string usually tells us the status word, so it is very valuable to see it. Lets make sure that the exception string is printed here. Change-Id: Icb30470b1c0eee6a15fc028da820e92bf9ded27a --- M pySim-read.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/68/9968/1 diff --git a/pySim-read.py b/pySim-read.py index 5ca39ee..561a498 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -134,8 +134,8 @@ print("MSISDN: Not available") else: print("MSISDN: Can't read, response code = %s" % (sw,)) - except: - print "MSISDN: Can't read. Probably not existing file" + except Exception as e: + print "HPLMNAcT: Can't read file -- " + str(e) # Done for this card and maybe for everything ? print "Done !\n" -- To view, visit https://gerrit.osmocom.org/9968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icb30470b1c0eee6a15fc028da820e92bf9ded27a Gerrit-Change-Number: 9968 Gerrit-PatchSet: 1 Gerrit-Owner: dexter