utils: catch exceptions during reader initalitation
Failed reader initializations happen frome time to time, mostly because
of messed up commandline arguments. This results in ugly crashes very
often. Lets control this a bit by catching the exception string and
print it.
Change-Id: I313017355da01bbef7c3d3f1899555aadb509319
diff --git a/pySim-read.py b/pySim-read.py
index f901260..7906685 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -82,6 +82,8 @@
# Init card reader driver
sl = init_reader(opts)
+ if sl is None:
+ exit(1)
# Create command layer
scc = SimCardCommands(transport=sl)