From 099d1d1c2cf7e5ecfa4c43d9a12aa0d0cee761f3 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 6 Sep 2013 17:35:50 +0200 Subject: TIL splitlines() --- src/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logger.py b/src/logger.py index bee6fd79..fad57bec 100644 --- a/src/logger.py +++ b/src/logger.py @@ -131,7 +131,7 @@ class Logger(object): if pos == -1: # If we don't have enough lines in the file pos = 1 # 1, because we do -1 just on the next line # to get 0 (start of the file) - lines = m[pos-1:].decode(errors='replace').split("\n")[:-1] + lines = m[pos-1:].decode(errors='replace').splitlines() messages = [] color = '\x19%s}' % dump_tuple(get_theme().COLOR_INFORMATION_TEXT) -- cgit v1.2.3