Tools: build_binaries.py: handle badly formed config.mk

This commit is contained in:
Peter Barker 2017-10-26 14:22:44 +11:00
parent c498f17bc8
commit b6404ff26b

View File

@ -570,11 +570,14 @@ is bob we will attempt to checkout bob-AVR'''
def pollute_env_from_file(self, filepath): def pollute_env_from_file(self, filepath):
with open(filepath) as f: with open(filepath) as f:
for line in f: for line in f:
try:
(name, value) = str.split(line, "=") (name, value) = str.split(line, "=")
except ValueError as e:
self.progress("%s: split failed: %s" % (filepath, str(e)))
continue
value = value.rstrip() value = value.rstrip()
self.progress("%s: %s=%s" % (filepath, name,value)) self.progress("%s: %s=%s" % (filepath, name,value))
os.environ[name] = value os.environ[name] = value
sys.exit(1)
def run(self): def run(self):
self.validate() self.validate()