Adjust input pre-processing so that a comment on the last line does not

break the processor; this will do the right thing.
This commit is contained in:
Fred Drake 2001-11-19 05:27:40 +00:00
parent e70dbe0fc5
commit 00c96aeba6
1 changed files with 3 additions and 1 deletions

View File

@ -109,7 +109,9 @@ def __init__(self, ifp, ofp, table):
self.write = ofp.write
self.ofp = ofp
self.table = table
self.line = string.join([s.rstrip() for s in ifp.readlines()], "\n")
L = [s.rstrip() for s in ifp.readlines()]
L.append("")
self.line = string.join(L, "\n")
self.preamble = 1
def convert(self):