commit 0b7e39969f1ed6c381296abed0cb87b52aa2e966 Author: Micha vor dem Berge m@mcvdb.de Date: Wed Jan 27 08:27:48 2010 +0000
If we got an empty log line just go on parsing with nothing instead of dying, now it works
Signed-off-by: Konstantin Ryabitsev mricon@kernel.org
py/epylog/helpers.py | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) --- diff --git a/py/epylog/helpers.py b/py/epylog/helpers.py index 83c2882..32550e6 100644 --- a/py/epylog/helpers.py +++ b/py/epylog/helpers.py @@ -120,14 +120,21 @@ class ModuleTest: """ Create a linemap out of a line entry. """ - # If we got an empty log line just go on parsing with nothing - # instead of dying - if line == "": return "" try: stamp, sys, msg = epylog.log.get_stamp_sys_msg(line, monthmap) except ValueError: - msg = 'Invalid syslog line: %s' % line - self._die(msg) + # If we got an empty log line just go on parsing with nothing + # instead of dying + if line == "": + linemap = {'line': "", + 'stamp': "", + 'system': "", + 'message': "", + 'multiplier': 1} + return linemap + else: + msg = 'Invalid syslog line: %s' % line + self._die(msg) linemap = {'line': line, 'stamp': stamp, 'system': sys,