Make sure lock pin is pulled down when exiting on interrupt

This commit is contained in:
Ondrej Mikle 2014-07-24 18:42:23 +02:00
parent e181278df5
commit 19721744a0
2 changed files with 16 additions and 0 deletions

View file

@ -99,6 +99,7 @@ class NFCScanner(object):
logging.info("Exiting on keyboard interrupt")
self.nfc.close()
self.nfc.unload()
self.unlocker.lock()
sys.exit(2)
except Exception:
logging.exception("Exception in main unlock thread")