Log args during list_concat
list_concat checks that all args are lists. If that fails, the exception will now show which args aren't a list, and show all the args. This is useful context to help find the error in the template. Change-Id: Ic88257fd36bdde884e8ac4f17186c42b76ec538b
This commit is contained in:
parent
8e41757bf7
commit
a8c44bddaa
|
@ -1596,8 +1596,11 @@ class ListConcat(function.Function):
|
|||
not isinstance(m, six.string_types)):
|
||||
return m
|
||||
else:
|
||||
msg = _('Incorrect arguments: Items to concat must be lists.')
|
||||
raise TypeError(msg)
|
||||
msg = _('Incorrect arguments: Items to concat must be lists. '
|
||||
'%(args)s contains an item that is not a list: '
|
||||
'%(item)s')
|
||||
raise TypeError(msg % dict(item=jsonutils.dumps(m),
|
||||
args=jsonutils.dumps(args)))
|
||||
|
||||
ret_list = []
|
||||
for m in args:
|
||||
|
|
Loading…
Reference in New Issue