From 6d8cd9b228325a1f49a3e50233e4b0fa96c19529 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 11 Jul 2012 00:56:50 +0100 Subject: [PATCH] make-secnet-sites: Do newline-trimming in pline() This will make life a little easier in a future patch. While we're at it, use rstrip rather than open-coding it. Signed-off-by: Ian Jackson --- make-secnet-sites | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/make-secnet-sites b/make-secnet-sites index dc6ec78..0c19a78 100755 --- a/make-secnet-sites +++ b/make-secnet-sites @@ -333,7 +333,7 @@ def set_property(obj,w): def pline(i,allow_include=False): "Process a configuration file line" global allow_defs, obstack, root - w=string.split(i) + w=string.split(i.rstrip('\n')) if len(w)==0: return keyword=w[0] current=obstack[len(obstack)-1] @@ -407,7 +407,6 @@ def pfile(name,lines,allow_include=False): for i in lines: line=line+1 if (i[0]=='#'): continue - if (i[len(i)-1]=='\n'): i=i[:len(i)-1] # strip trailing LF pline(i,allow_include=allow_include) def outputsites(w): -- 2.30.2