From fbe52e8e139e199963eacbcfdc90c2a518a9a0cc Mon Sep 17 00:00:00 2001 From: Nicholas O'Connor Date: Thu, 23 Mar 2017 14:44:39 -0700 Subject: [PATCH] fixed errant newlines in generated code --- include/internal/bottles.hpp.cog | 2 +- src/bottles/commands.cpp.cog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/internal/bottles.hpp.cog b/include/internal/bottles.hpp.cog index aeb0e1a..23b0518 100644 --- a/include/internal/bottles.hpp.cog +++ b/include/internal/bottles.hpp.cog @@ -10,7 +10,7 @@ namespace cellar { with open("src/bottles/commands.txt") as commandsfile: for line in commandsfile: - item = line.split(" ") + item = line.strip().split(" ") cog.outl("extern void {0} (int, char**);".format(item[1])) ]]]*/ //[[[end]]] diff --git a/src/bottles/commands.cpp.cog b/src/bottles/commands.cpp.cog index ab101cf..c2d2671 100644 --- a/src/bottles/commands.cpp.cog +++ b/src/bottles/commands.cpp.cog @@ -17,7 +17,7 @@ DLL_PUBLIC map cellar::commands::bottles_commands() { with open("src/bottles/commands.txt") as commandfile: for line in commandfile: - linesplit = line.split(" ") + linesplit = line.strip().split(" ") name = linesplit[0] func = linesplit[1]