1
0
Fork 0

more comments

This commit is contained in:
Kevin Matz 2019-11-17 11:10:48 -05:00
parent 7956b73e2f
commit 4c7192fd41
1 changed files with 6 additions and 1 deletions

View File

@ -25,12 +25,14 @@ from signal import pause
# Device.pin_factory = MockFactory()
# callback intermidiary to sanitize user input
def _activate(macro):
if macro is None:
return
macro = macro.strip('\"').upper()
if macro is "":
return
# pass macro to baconscript
print("doing macro ", macro)
comment(macro)
@ -63,12 +65,15 @@ for b in config.get('button', 'names').split(','):
print('Error configuring button', b, e)
continue
# clear temp variables off the stack
try:
# clear temp variables off the stack
del pin, closed, opened
except (NameError):
pass
# when run directly, sleep until button signal or KeyboardInterrupt
if __name__ == '__main__':
try:
pause()