No newline at end of file...
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 05 Feb 2009 19:14:22 -0500
changeset 44 65ec57ff7d90d5e9a774a3bfc58d5cff48fab51d
parent 43 87a1810a9a52a342c6d62cdb483660b152632c65
child 45 996c5791e40cfff1b9956a1fce651788d3437946
push id25
push userbsmedberg@mozilla.com
push dateFri, 06 Feb 2009 00:14:47 +0000
No newline at end of file...
pymake/parser.py
--- a/pymake/parser.py
+++ b/pymake/parser.py
@@ -250,27 +250,27 @@ def parsestream(fd, filename, makefile):
 
     fdlines = _iterlines(fd)
 
     for lineno, line in fdlines:
         if line.startswith('\t') and currule is not None:
             d = Data()
             isc = iscontinuation(line)
             if not isc:
-                line = line[:-1] # strip newline
+                line = line.rstrip('\n')
             d.append(line[1:], Location(filename, lineno, tabwidth))
             while isc:
                 lineno, line = fdlines.next()
                 startcol = 0
                 if line.startswith('\t'):
                     startcol = tabwidth
                     line = line[1:]
                 isc = iscontinuation(line)
                 if not isc:
-                    line = line[:-1] # strip newline
+                    line = line.rstrip('\n')
                 d.append(line, Location(filename, lineno, startcol))
             currule.addcommand(parsetoend(d, 0, False))
         else:
             # To parse Makefile syntax, we first strip leading whitespace and
             # join continued lines, then look for initial keywords. If there
             # are no keywords, it's either setting a variable or writing a
             # rule.