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
This commit is contained in:
Oliver Smith
2024-05-24 11:53:54 +02:00
committed by laforge
parent 172c9f7ca6
commit 56264669a7

View File

@@ -57,7 +57,7 @@ class PcscSimLink(LinkBase):
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):