Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3821)

Unified Diff: build/android/pylib/device/device_utils.py

Issue 910793002: Allow empty line when parsing properties files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index 6b1a91cefd3869327b7273632de54668b1c262af..a1b4117f7b963887e8516526ec0fc878ba5c1c8a 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -1046,6 +1046,8 @@ class DeviceUtils(object):
"""
def find_property(lines, property_name):
for index, line in enumerate(lines):
+ if line.strip() == '':
+ continue
key, value = (s.strip() for s in line.split('=', 1))
if key == property_name:
return index, value
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698