Skip to content

Commit

Permalink
Code review: 343190043: Changes to make LinuxSystemdOperatingSystemPl…
Browse files Browse the repository at this point in the history
…ugin more error resilient log2timeline#1894
  • Loading branch information
joachimmetz committed May 21, 2018
1 parent 96a7749 commit 99c768d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/dpkg/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plaso (20180520-1) unstable; urgency=low
plaso (20180521-1) unstable; urgency=low

* Auto-generated

-- Log2Timeline <log2timeline-dev@googlegroups.com> Sun, 20 May 2018 06:04:31 +0200
-- Log2Timeline <log2timeline-dev@googlegroups.com> Mon, 21 May 2018 06:28:57 +0200
2 changes: 1 addition & 1 deletion plaso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

from __future__ import unicode_literals

__version__ = '20180520'
__version__ = '20180521'
10 changes: 8 additions & 2 deletions plaso/preprocessors/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,15 @@ def _ParseFileData(self, knowledge_base, file_object):

product_values = {}
for line in text_file_object.readlines():
line = line.strip()

# Ignore lines that do not define a key value pair.
if '=' not in line:
continue

key, value = line.split('=')
key = key.strip().upper()
value = value.strip().strip('"')
key = key.upper()
value = value.strip('"')
product_values[key] = value

if not knowledge_base.GetValue('operating_system_product'):
Expand Down

0 comments on commit 99c768d

Please sign in to comment.