# HG changeset patch # User Doug Simon # Date 1372668744 -7200 # Node ID be8b942f448fb98185c46789a9aa3037ce87ecc4 # Parent ace9e84cc7735dc7120e1a172e3b527095860422 made parsing of mx/env more robust diff -r ace9e84cc773 -r be8b942f448f mxtool/mx.py --- a/mxtool/mx.py Sun Jun 30 11:24:38 2013 -0400 +++ b/mxtool/mx.py Mon Jul 01 10:52:24 2013 +0200 @@ -606,12 +606,15 @@ e = join(mxDir, 'env') if exists(e): with open(e) as f: + lineNum = 0 for line in f: + lineNum = lineNum + 1 line = line.strip() if len(line) != 0 and line[0] != '#': + if not '=' in line: + abort(e + ':' + str(lineNum) + ': line does not match pattern "key=value"') key, value = line.split('=', 1) os.environ[key.strip()] = expandvars_in_property(value.strip()) - def _post_init(self, opts): mxDir = join(self.dir, 'mx') self._load_projects(mxDir)