Skip to content

Commit

Permalink
PCSCCardRequest: use "if xxx not in yyy:"
Browse files Browse the repository at this point in the history
It is more Pythonist than "if not xxx in yyy:"
  • Loading branch information
LudovicRousseau committed Oct 19, 2024
1 parent d9c0bf9 commit ce01504
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/smartcard/pcsc/PCSCCardRequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def waitforcard(self):
readernames.append("\\\\?PnP?\\Notification")

for reader in readernames:
if not reader in readerstates:
if reader not in readerstates:
readerstates[reader] = (reader, SCARD_STATE_UNAWARE)

# call SCardGetStatusChange only if we have some readers
Expand Down Expand Up @@ -207,7 +207,7 @@ def waitforcard(self):
readernames.append("\\\\?PnP?\\Notification")

for reader in readernames:
if not reader in readerstates:
if reader not in readerstates:
readerstates[reader] = (reader, SCARD_STATE_UNAWARE)

# remove dictionary entry for readers that disappeared
Expand Down

0 comments on commit ce01504

Please sign in to comment.