1
0
Fork 0

sanity checks on user configured value

This commit is contained in:
Kevin Matz 2019-11-03 20:42:23 -05:00
parent 25c65d7492
commit 907336204b
1 changed files with 7 additions and 1 deletions

View File

@ -26,6 +26,12 @@ from signal import pause
def activate(path):
if path is None:
return
path = path.strip()
if path is "":
return
print("doing macro ", path)
comment(path)
@ -33,7 +39,7 @@ def activate(path):
_buttons = {}
# open config file
config = configparser.ConfigParser(allow_no_value=False)
config = configparser.ConfigParser(allow_no_value=True)
config.read('buttons.cfg')
# set up each buttons
for b in config.get('button', 'names').split(','):