Fix timestamps of unparsable lines to fix line density display

This commit is contained in:
René Stadler 2007-11-15 18:17:28 +02:00 committed by Stefan Sauer
parent 00786f0121
commit 0482a50c3b

View file

@ -239,7 +239,6 @@ class LazyLogModel (LogModelBase):
non_regex_line = line[:non_regex_len]
regex_line = line[non_regex_len:]
try:
prefix = non_regex_line.rstrip ()
while " " in prefix:
prefix = prefix.replace (" ", " ")
@ -247,14 +246,16 @@ class LazyLogModel (LogModelBase):
ts = Data.parse_time (ts_s)
pid = int (pid_s)
thread = int (thread_s, 16)
try:
level = Data.DebugLevel (level_s)
match = self.__line_regex.match (regex_line[:-len (os.linesep)])
except ValueError:
level = Data.DebugLevelNone
match = None
if match is None:
# FIXME?
groups = [0, 0, 0, Data.DebugLevelNone, "", "", 0, "", "", non_regex_len]
groups = [ts, pid, thread, level, "", "", 0, "", "", non_regex_len]
else:
groups = [ts, pid, thread, level] + list (match.groups ()) + [non_regex_len + match.end ()]