From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id B24A2E007E8; Tue, 12 Jul 2016 06:36:33 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.93 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 49F3EE0077E for ; Tue, 12 Jul 2016 06:36:31 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 12 Jul 2016 06:36:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,352,1464678000"; d="scan'208";a="137795474" Received: from linux.intel.com ([10.54.29.200]) by fmsmga004.fm.intel.com with ESMTP; 12 Jul 2016 06:36:31 -0700 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.68]) by linux.intel.com (Postfix) with ESMTP id 9234E6A4080; Tue, 12 Jul 2016 06:36:23 -0700 (PDT) From: Ed Bartosh To: toaster@yoctoproject.org Date: Tue, 12 Jul 2016 16:26:27 +0300 Message-Id: <1468329987-1779-1-git-send-email-ed.bartosh@linux.intel.com> X-Mailer: git-send-email 2.1.4 Subject: [PATCH] toaster: fix unhandled traceback 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: Tue, 12 Jul 2016 13:36:33 -0000 manage.py lsupdates throws DataError exception if the recipe can't be saved to the MySQL database: django.db.utils.DataError: (1406, "Data too long for column 'license' at row 1" Adding DataError exception to the list of exceptions should make lsupdates to print a warning message and skip the recipe. Signed-off-by: Ed Bartosh --- bitbake/lib/toaster/orm/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 61f6a20..4bbca24 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -21,7 +21,7 @@ from __future__ import unicode_literals -from django.db import models, IntegrityError +from django.db import models, IntegrityError, DataError from django.db.models import F, Q, Avg, Max, Sum, Count from django.utils import timezone from django.utils.encoding import force_bytes @@ -1469,7 +1469,7 @@ class LayerIndexLayerSource(LayerSource): else: # workaround for old style layer index ro.is_image = "-image-" in ri['pn'] ro.save() - except IntegrityError as e: + except (IntegrityError, DataError) as e: logger.debug("Failed saving recipe, ignoring: %s (%s:%s)" % (e, ro.layer_version, ri['filepath']+"/"+ri['filename'])) ro.delete() -- 2.1.4