bitbake: toaster: fix unhandled exception
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. (Bitbake rev: 01891c13ae8dcba64e5cf79956f1b64c2afdaae3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
f6261da9c0
commit
953ba7a221
|
@ -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, Sum, Count
|
||||
from django.utils import timezone
|
||||
from django.utils.encoding import force_bytes
|
||||
|
@ -78,7 +78,7 @@ if 'sqlite' in settings.DATABASES['default']['ENGINE']:
|
|||
try:
|
||||
obj = self.create(**params)
|
||||
return obj, True
|
||||
except IntegrityError:
|
||||
except (IntegrityError, DataError):
|
||||
exc_info = sys.exc_info()
|
||||
try:
|
||||
return self.get(**lookup), False
|
||||
|
|
Loading…
Reference in New Issue