osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/36921?usp=email )
Change subject: pcsc: don't assume opts.pcsc_shared is present ......................................................................
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(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/21/36921/1
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):