From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id EF67FE00FC5; Fri, 25 Sep 2015 11:07:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.179 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 95F98E00FBC for ; Fri, 25 Sep 2015 11:07:46 -0700 (PDT) Received: by wicfx3 with SMTP id fx3so32296315wic.1 for ; Fri, 25 Sep 2015 11:07:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=S8KoA2LnU+SahEZDKPjZHGdY3at/Up4V6RwBl+lDCCA=; b=FNQh102/Iv1enGQF3fJ6qGK2y16ruFzoG1zkFn+9Qqi28hh+v/TMbAABsAB3WNrURV 2kzeMeng/rMRzUnuXGOEc93v6MIl1xNmAAaeAngraE4hYCBxM/hEgc1gPGNe3kp5H/a5 G+qUqF1wk/2BxzQY8iEMcugNiv3TqNb1/KDswBjWX55esaWJGsNYm7zlhBKvqlJpG4T/ omZznH9PuBTNq7JkN2MLbm8gRKMagPKjjyGeFijCGDoWcvUsdrLkbUwiazx9UxUTf1Xf dxPP+XiI26u5kQLg+VMlj5coRe4MkHTB1y3lgkK29QqqQCN8oHCOV36wIiH77b/1lOV6 0j3A== X-Gm-Message-State: ALoCoQk24ESiqCP58c1FoOPrCJhbZG6Ayy1IlfPxzdDu7ypjkmjh42sxlJBHd7NoUajy9qQ9CdvM X-Received: by 10.180.93.196 with SMTP id cw4mr5161587wib.54.1443204465978; Fri, 25 Sep 2015 11:07:45 -0700 (PDT) Received: from draco.isw.intel.com ([83.217.123.106]) by smtp.gmail.com with ESMTPSA id uq5sm4511789wjc.3.2015.09.25.11.07.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Sep 2015 11:07:45 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Fri, 25 Sep 2015 19:07:16 +0100 Message-Id: <1443204452-32244-6-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443204452-32244-1-git-send-email-michael.g.wood@intel.com> References: <1443204452-32244-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 05/21] toaster: widgets ToasterTable Add more info to search field exception X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2015 18:07:48 -0000 If we get a search fields exception then also print out the model name Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastergui/widgets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index 7f96370..aaa59c0 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/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(" "): -- 2.1.4