aboutsummaryrefslogtreecommitdiffstats
path: root/pySim-read.py
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-07-11 23:02:36 +0200
committerdexter <pmaier@sysmocom.de>2018-07-13 08:56:58 +0000
commitea6bdf0b99f1f62cc7420ee0ee08ee5c2dbfda2c (patch)
tree39effe65f4643f4e021318664381414f47970a14 /pySim-read.py
parent589c1a4ff578b978484793debc77cc79e1291df3 (diff)
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
Diffstat (limited to 'pySim-read.py')
-rwxr-xr-xpySim-read.py4
1 files changed, 2 insertions, 2 deletions
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 @@ if __name__ == '__main__':
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"