bitbake: toastergui: enable strict variable checking

In order to make sure we don't use undefined variables in the
templates, we enforce strict variable checking in the templating
engine.

(Bitbake rev: 3928dc93188880386588fe3f440cd0aaa83d22de)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexandru DAMIAN
2015-06-22 14:54:08 +01:00
committed by Richard Purdie
parent 0b2e6442a6
commit 933e4dbb50

View File

@@ -386,3 +386,10 @@ connection_created.connect(activate_synchronous_off)
#
class InvalidString(str):
def __mod__(self, other):
from django.template.base import TemplateSyntaxError
raise TemplateSyntaxError(
"Undefined variable or unknown value for: \"%s\"" % other)
TEMPLATE_STRING_IF_INVALID = InvalidString("%s")