From 485e90176c6cbeae1b22332e4ef7a6cbb80c7e3d Mon Sep 17 00:00:00 2001 From: snare Date: Sun, 7 Jul 2013 21:45:28 +1000 Subject: [PATCH] Fixed comment parsing --- voltron.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/voltron.py b/voltron.py index fcfdfe0..82f5ac7 100755 --- a/voltron.py +++ b/voltron.py @@ -86,7 +86,9 @@ def main(debugger=None, dict=None): log = logging.getLogger('') # Load config - config = json.loads(file(os.path.expanduser('~/.voltron')).read()) + config_data = file(os.path.expanduser('~/.voltron')).read() + lines = filter(lambda x: len(x) != 0 and x[0] != '#', config_data.split('\n')) + config = json.loads('\n'.join(lines)) # Set up queue queue = Queue.Queue()