mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 21:49:33 +02:00
bitbake: data_smart: Don't add None to ExpansionError varlist
If a "None" value gets into the varlist, it doesn't display properly. Ensure we don't add one to have the exception display properly. (Bitbake rev: ee26e258888114143e66330c256b5bfe7d071c53) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -151,7 +151,7 @@ class ExpansionError(Exception):
|
|||||||
self.expression = expression
|
self.expression = expression
|
||||||
self.variablename = varname
|
self.variablename = varname
|
||||||
self.exception = exception
|
self.exception = exception
|
||||||
self.varlist = [varname or expression]
|
self.varlist = [varname or expression or ""]
|
||||||
if varname:
|
if varname:
|
||||||
if expression:
|
if expression:
|
||||||
self.msg = "Failure expanding variable %s, expression was %s which triggered exception %s: %s" % (varname, expression, type(exception).__name__, exception)
|
self.msg = "Failure expanding variable %s, expression was %s which triggered exception %s: %s" % (varname, expression, type(exception).__name__, exception)
|
||||||
@@ -163,7 +163,8 @@ class ExpansionError(Exception):
|
|||||||
self.args = (varname, expression, exception)
|
self.args = (varname, expression, exception)
|
||||||
|
|
||||||
def addVar(self, varname):
|
def addVar(self, varname):
|
||||||
self.varlist.append(varname)
|
if varname:
|
||||||
|
self.varlist.append(varname)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
chain = "\nThe variable dependency chain for the failure is: " + " -> ".join(self.varlist)
|
chain = "\nThe variable dependency chain for the failure is: " + " -> ".join(self.varlist)
|
||||||
|
|||||||
Reference in New Issue
Block a user