From a33da15c9fc019a40376e0e98d1cb54302b86699 Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Sun, 17 Nov 2019 13:25:18 -0500 Subject: [PATCH] sanitize names, not the list --- comment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/comment.py b/comment.py index 99e34e0..9fc97d4 100755 --- a/comment.py +++ b/comment.py @@ -50,10 +50,11 @@ config = configparser.ConfigParser(allow_no_value=True) config.read('server.cfg') # set up each hog device -for name in config.get('network', 'hogs').split(',').strip('\"'): +for name in config.get('network', 'hogs').split(','): try: # move to config section server = config[name] + server = config[name.strip().strip('\"')] # read settings ip = server.get("ip", "10.0.0.100") port = server.getint("port", 7001)