OSDN Git Service

Accomodate to the import syntax in build.prop.
authorYing Wang <wangying@google.com>
Tue, 15 Apr 2014 18:24:00 +0000 (11:24 -0700)
committerYing Wang <wangying@google.com>
Tue, 15 Apr 2014 20:28:53 +0000 (20:28 +0000)
Bug: 14024566
Change-Id: I71692244fabcd4d12f65849ffa027295b3a2a79a
(cherry picked from commit 092fea0d3e644573d7f0dbfe6692f42431f83c5c)

tools/releasetools/common.py

index ca73ee4..3d8d5ff 100644 (file)
@@ -179,8 +179,9 @@ def LoadBuildProp(read_helper):
   for line in data.split("\n"):
     line = line.strip()
     if not line or line.startswith("#"): continue
-    name, value = line.split("=", 1)
-    d[name] = value
+    if "=" in line:
+      name, value = line.split("=", 1)
+      d[name] = value
   return d
 
 def LoadRecoveryFSTab(read_helper, fstab_version):