Merge branch 'change_pn532_poll'

This commit is contained in:
Ondrej Mikle 2018-05-06 19:35:10 +02:00
commit de2e46d6d3
3 changed files with 16 additions and 15 deletions

View file

@ -127,8 +127,10 @@ class NFCScanner(object):
e = threading.Event()
e.wait(timeout=0.3)
except NFCError, e:
#this exception happens also when scanUID times out
logging.debug("Failed to wait for RFID card: %s", e)
#this exception happens also when scanUID finds no cards
logging.debug("Failed to find RFID cards in reader's field: %s", e)
e = threading.Event()
e.wait(timeout=0.2)
except KeyboardInterrupt:
logging.info("Exiting on keyboard interrupt")
self.nfc.close()