[bitbake-devel] [PATCH 05/22] toaster: widgets ToasterTable Add more info to search field exception

brian avery avery.brian at gmail.com
Tue Sep 29 04:45:15 UTC 2015


From: Michael Wood <michael.g.wood at intel.com>

If we get a search fields exception then also print out the model name

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: brian avery <avery.brian at gmail.com>
---
 lib/toaster/toastergui/widgets.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/toaster/toastergui/widgets.py b/lib/toaster/toastergui/widgets.py
index 7f96370..aaa59c0 100644
--- a/lib/toaster/toastergui/widgets.py
+++ b/lib/toaster/toastergui/widgets.py
@@ -229,7 +229,8 @@ class ToasterTable(TemplateView):
         """Creates a query based on the model's search_allowed_fields"""
 
         if not hasattr(self.queryset.model, 'search_allowed_fields'):
-            raise Exception("Err Search fields aren't defined in the model")
+            raise Exception("Search fields aren't defined in the model %s"
+                           % self.queryset.model)
 
         search_queries = []
         for st in search_term.split(" "):
-- 
1.9.1




More information about the bitbake-devel mailing list