using raise produces a screen full of stuff the user can't
understand. The message is much clearer with an exit
vname = v[2:-1]
if not vname in env:
print "Failed to find variable %s in %s" % (vname, string)
- raise
+ sys.exit(1)
v = env[vname]
out.append(v)
return ''.join(out)
# typo of $( instead of ${
if ret.find('${') != -1 or ret.find('$(') != -1:
print('Failed to substitute all variables in varstr=%s' % ret)
- raise
+ sys.exit(1)
return ret
Build.BuildContext.EXPAND_VARIABLES = EXPAND_VARIABLES