Skip to content

Commit

Permalink
events: add support of pinpad readers
Browse files Browse the repository at this point in the history
Use "-p NULL" to enter PIN on a pinpad reader.
  • Loading branch information
LudovicRousseau committed Oct 16, 2017
1 parent c84e55b commit cb5b219
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions samples/events.py
Expand Up @@ -27,7 +27,7 @@

def usage():
print("Usage:", sys.argv[0], end=' ')
print("[-p pin][--pin=pin]", end=' ')
print("[-p pin][--pin=pin] (use 'NULL' for pinpad)", end=' ')
print("[-c lib][--lib=lib]", end=' ')
print("[-h][--help]", end=' ')
print("[-o][--opensession]")
Expand All @@ -42,7 +42,7 @@ def usage():
sys.exit(2)

lib = None
pin = None
pin = ""
open_session = False
pin_available = False
list_mechanisms = False
Expand All @@ -52,6 +52,8 @@ def usage():
sys.exit()
if o in ("-p", "--pin"):
pin = a
if pin == "NULL":
pin = None
pin_available = True
open_session = True
if o in ("-c", "--lib"):
Expand Down

0 comments on commit cb5b219

Please sign in to comment.