fix line endings in layout2layout.py

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10570 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-10-24 14:13:45 +00:00
parent 7020659bc6
commit 5d65c9bb09
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-10-24 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* scripts/layout2layout.py: fix line ending removal
2005-10-21 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* layouts/*.{inc,layout}: Add format information

View File

@ -29,7 +29,7 @@ def trim_eol(line):
" Remove end of line char(s)."
if line[-2:-1] == '\r':
return line[:-2]
elif line[-1:-1] == '\r' or line[-1:-1] == '\n':
elif line[-1:] == '\r' or line[-1:] == '\n':
return line[:-1]
else:
# file with no EOL in last line