diff --git a/buttond.py b/buttond.py index 9f19fb5..0a47d3f 100755 --- a/buttond.py +++ b/buttond.py @@ -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(','):