Skip to content

Commit

Permalink
GetSetNAD: fix Python warnings
Browse files Browse the repository at this point in the history
./GetSetNAD.py:35: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if status is 0:
./GetSetNAD.py:51: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if status is 0:
  • Loading branch information
LudovicRousseau committed Jun 5, 2024
1 parent 44854f2 commit 1b5f11e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/GetSetNAD.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_nad(cardConnection):
res = cardConnection.control(SCARD_CTL_CODE(3600), get_NAD)
print(" result:", toHexString(res))
status = res[3]
if status is 0:
if status == 0:
print("Success")
nad = res[4]
print("NAD:", nad)
Expand All @@ -48,7 +48,7 @@ def set_nad(cardConnection, nad):
res = cardConnection.control(SCARD_CTL_CODE(3600), set_NAD)
print(" result:", toHexString(res))
status = res[3]
if status is 0:
if status == 0:
print("Success")
else:
print("Failed!")
Expand Down

0 comments on commit 1b5f11e

Please sign in to comment.