Ignore initial non-dated lines

Initial lines, if non dated, generated an exception, this fixes
the issue by ignoring those lines.
This commit is contained in:
Miguel Angel Ajo 2015-11-08 22:41:42 +01:00
parent 183efe3b13
commit db9527b3d4
1 changed files with 4 additions and 3 deletions

View File

@ -75,9 +75,10 @@ class OpenStackLog:
except ValueError:
# it's a non-dated line, just append to the entry
# extra info
(date_object, filename, pid, level, rest) = entry
entry = (date_object, filename, pid, level,
rest + EXTRALINES_PADDING + line)
if entry:
(date_object, filename, pid, level, rest) = entry
entry = (date_object, filename, pid, level,
rest + EXTRALINES_PADDING + line)
if entry:
yield entry