sanity checks on user configured value
This commit is contained in:
parent
25c65d7492
commit
907336204b
|
@ -26,6 +26,12 @@ from signal import pause
|
||||||
|
|
||||||
|
|
||||||
def activate(path):
|
def activate(path):
|
||||||
|
if path is None:
|
||||||
|
return
|
||||||
|
path = path.strip()
|
||||||
|
if path is "":
|
||||||
|
return
|
||||||
|
print("doing macro ", path)
|
||||||
comment(path)
|
comment(path)
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +39,7 @@ def activate(path):
|
||||||
_buttons = {}
|
_buttons = {}
|
||||||
|
|
||||||
# open config file
|
# open config file
|
||||||
config = configparser.ConfigParser(allow_no_value=False)
|
config = configparser.ConfigParser(allow_no_value=True)
|
||||||
config.read('buttons.cfg')
|
config.read('buttons.cfg')
|
||||||
# set up each buttons
|
# set up each buttons
|
||||||
for b in config.get('button', 'names').split(','):
|
for b in config.get('button', 'names').split(','):
|
||||||
|
|
Loading…
Reference in New Issue