laforge submitted this change.
pcsc: don't assume opts.pcsc_shared is present
Fixes running contrib/sim-rest-server.py:
builtins.AttributeError: 'Namespace' object has no attribute 'pcsc_shared'
Change-Id: I864f65849c5d43cf7c73e60f1935afdf4273f696
---
M pySim/transport/pcsc.py
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py
index 9198816..8a1e03c 100644
--- a/pySim/transport/pcsc.py
+++ b/pySim/transport/pcsc.py
@@ -57,7 +57,7 @@
raise ReaderError('No matching reader found for regex %s' % opts.pcsc_regex)
self._con = self._reader.createConnection()
- if not opts.pcsc_shared:
+ if not getattr(opts, "pcsc_shared", False):
self._con = ExclusiveConnectCardConnection(self._con)
def __del__(self):
To view, visit change 36921. To unsubscribe, or for help writing mail filters, visit settings.