changeset 5790:3b7c12c2976c editlogfixes

logfile: strip \n lineends from line data (it is part of the file structure, not of the data)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 12 Oct 2011 10:19:39 +0200
parents e1e79fab9cca
children 3af85d24e50f
files MoinMoin/logfile/__init__.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/logfile/__init__.py	Tue Oct 11 14:27:11 2011 +0200
+++ b/MoinMoin/logfile/__init__.py	Wed Oct 12 10:19:39 2011 +0200
@@ -77,7 +77,7 @@
         self.offsets = offsets
         self.len = linecount
         # Decode lines after offset in file is calculated
-        self.lines = [unicode(line, config.charset) for line in lines]
+        self.lines = [unicode(line.rstrip('\n'), config.charset) for line in lines]
 
 
 class LogFile: