Commit f91e8d7a authored by qsr's avatar qsr Committed by Commit bot

Allow empty line when parsing properties files.

R=skyostil@chromium.org

Review URL: https://codereview.chromium.org/910793002

Cr-Commit-Position: refs/heads/master@{#315354}
parent f7302eb7
...@@ -1046,6 +1046,8 @@ class DeviceUtils(object): ...@@ -1046,6 +1046,8 @@ class DeviceUtils(object):
""" """
def find_property(lines, property_name): def find_property(lines, property_name):
for index, line in enumerate(lines): for index, line in enumerate(lines):
if line.strip() == '':
continue
key, value = (s.strip() for s in line.split('=', 1)) key, value = (s.strip() for s in line.split('=', 1))
if key == property_name: if key == property_name:
return index, value return index, value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment