From c1ebdd7b160c8dbe18c046251bcb187b00bc4bcd Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Sun, 21 Oct 2018 22:15:40 -0400 Subject: [PATCH] variable rename for consistency --- comment.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/comment.py b/comment.py index 6117672..291e940 100755 --- a/comment.py +++ b/comment.py @@ -38,13 +38,13 @@ logger.addHandler(ch) # add console log handler # TODO: refactor this to support multiple net#s config = configparser.ConfigParser(allow_no_value=True) config.read('server.cfg') # open config file -hog4 = {} # init an empty dictionary +servers = {} # init an empty dictionary server = config['hog4'] # section of config file net = server.getint("net", 1) # default to net #1 logger.info("Adding Hog device at net# " + str(net)) # osc clients are added to the dictionary with the net # as the key -hog4[net] = udp_client.SimpleUDPClient(server.get("ip", "10.0.0.1"), - server.getint("port", 6600)) +servers[net] = udp_client.SimpleUDPClient(server.get("ip", "10.0.0.1"), + server.getint("port", 6600)) def comment(text): @@ -53,7 +53,7 @@ def comment(text): stream = antlr4.CommonTokenStream(lexer) parser = CommentMacroParser(stream) tree = parser.prog() - oscMacro = OscCommentMacroListener(hog4) + oscMacro = OscCommentMacroListener(servers) walker = antlr4.ParseTreeWalker() walker.walk(oscMacro, tree)