Move main loop into a new function
This lets the simulator drop to the command line rather than looping. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
d20813b4ff
commit
668260c7b2
17
doors.py
17
doors.py
|
@ -117,9 +117,14 @@ def read_rfid():
|
||||||
RFID_SERIAL.flushInput() # ignore errors, no data
|
RFID_SERIAL.flushInput() # ignore errors, no data
|
||||||
|
|
||||||
|
|
||||||
while True:
|
|
||||||
try:
|
def main():
|
||||||
read_rfid()
|
while True:
|
||||||
except Exception(e):
|
try:
|
||||||
door_close()
|
read_rfid()
|
||||||
print(e)
|
except Exception as e:
|
||||||
|
door_close()
|
||||||
|
print(e)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__": main()
|
||||||
|
|
Loading…
Reference in New Issue