summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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")