Guard against all exceptions when processing a line

You never know what's in the input string, so catch all possible
failures without crashing the tool.

Related-Bug: #1672921
Change-Id: I3a518be2e6087d0a096fa3c36aa40dcad8aecb98
This commit is contained in:
Ihar Hrachyshka 2017-03-08 06:04:48 +00:00
parent 77c2819793
commit 881b6fd359
1 changed files with 3 additions and 3 deletions

View File

@ -217,9 +217,9 @@ class LogFile(object):
return entry, new_entry
entry = new_entry
except ValueError:
# it's a non-dated line, just append to the entry
# extra info
except Exception:
# it's probably a non-dated line, or a garbled entry, just
# append to the entry extra info
if entry:
entry.append_line(line)