aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-21 16:50:25 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-25 18:24:41 +0300
commite6b86872ce1fd91c4eea598a16bb72b2e108300f (patch)
tree56707ed3e012bbc96b7bf6d4b205bc9f0a55fa3e
parentb95445159bb3778a16cd028fed25b5d8d18ee8cd (diff)
transport/pcsc: throw ReaderError with a message
Before this patch: $ ./pySim-shell.py -p 0 Card reader initialization failed with an exception of type: <class 'pySim.exceptions.ReaderError'> after: $ ./pySim-shell.py -p 0 Card reader initialization failed with exception: No reader found for number 0 Change-Id: Id08c4990857f7083a8d1cefc90ff85fc20ab6fef
-rw-r--r--pySim/transport/pcsc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py
index ca1751a..e3f2546 100644
--- a/pySim/transport/pcsc.py
+++ b/pySim/transport/pcsc.py
@@ -34,7 +34,7 @@ class PcscSimLink(LinkBase):
super().__init__(**kwargs)
r = readers()
if reader_number >= len(r):
- raise ReaderError
+ raise ReaderError('No reader found for number %d' % reader_number)
self._reader = r[reader_number]
self._con = self._reader.createConnection()