more comments
This commit is contained in:
parent
7956b73e2f
commit
4c7192fd41
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue