summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-22 14:54:08 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-26 09:27:31 +0100
commit933e4dbb5048ea84c32f2313e6c8e5ca7895fe48 (patch)
tree100fc137b0261dc90fc1b92b53420270f45d3321
parent0b2e6442a6da8d05649530365601f49d37cb6ab5 (diff)
downloadpoky-933e4dbb5048ea84c32f2313e6c8e5ca7895fe48.tar.gz
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>
-rw-r--r--bitbake/lib/toaster/toastermain/settings.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index 3c7cb3bc4d..141ad08877 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -386,3 +386,10 @@ connection_created.connect(activate_synchronous_off)
386# 386#
387 387
388 388
389class InvalidString(str):
390 def __mod__(self, other):
391 from django.template.base import TemplateSyntaxError
392 raise TemplateSyntaxError(
393 "Undefined variable or unknown value for: \"%s\"" % other)
394
395TEMPLATE_STRING_IF_INVALID = InvalidString("%s")