From 56264669a7548ca4c0cc816cea67472b1a7ff1dc Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 24 May 2024 11:53:54 +0200 Subject: [PATCH] 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 --- pySim/transport/pcsc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py index 9198816d..8a1e03cd 100644 --- a/pySim/transport/pcsc.py +++ b/pySim/transport/pcsc.py @@ -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):