summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-05-30 17:17:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 17:23:31 +0100
commit64f88bf5d977f5aedf4fda672bba4aa165a72763 (patch)
tree50a1b8427c6ad4d29c5f689f0ea5e8580a2e6aa0 /bitbake/lib/bb
parent5a975239eabe1f1e5f03d3fb10fd7d31929f35aa (diff)
downloadpoky-64f88bf5d977f5aedf4fda672bba4aa165a72763.tar.gz
lib/bb/data_smart.py: don't report variable in ExpansionError if not set
If the variable name is not specified then don't confuse the error message by starting off with "Failure expanding variable None...". (Bitbake rev: 9cb16f3c73751e7cf6d495586a6193f06eb97b1f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/data_smart.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 27fb7d9915..2c02cdeabf 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -102,7 +102,10 @@ class ExpansionError(Exception):
102 self.expression = expression 102 self.expression = expression
103 self.variablename = varname 103 self.variablename = varname
104 self.exception = exception 104 self.exception = exception
105 self.msg = "Failure expanding variable %s, expression was %s which triggered exception %s: %s" % (varname, expression, type(exception).__name__, exception) 105 if varname:
106 self.msg = "Failure expanding variable %s, expression was %s which triggered exception %s: %s" % (varname, expression, type(exception).__name__, exception)
107 else:
108 self.msg = "Failure expanding expression %s which triggered exception %s: %s" % (expression, type(exception).__name__, exception)
106 Exception.__init__(self, self.msg) 109 Exception.__init__(self, self.msg)
107 self.args = (varname, expression, exception) 110 self.args = (varname, expression, exception)
108 def __str__(self): 111 def __str__(self):