mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
bitbake: toaster: use force_bytes to display non-ascii project names
When user enters a non-ascii character in the project name of toaster, the build doesn't get triggered. Use force_bytes to fix this. Also deal with non-ascii project names when logging the build request in runbuilds. [YOCTO #9071] (Bitbake rev: b6141c4d170885d3bdf63074afcb1e41fde0a8f0) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -19,9 +19,12 @@
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, IntegrityError
|
||||
from django.db.models import F, Q, Avg, Max, Sum
|
||||
from django.utils import timezone
|
||||
from django.utils.encoding import force_bytes
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
@@ -1614,7 +1617,7 @@ class LogMessage(models.Model):
|
||||
lineno = models.IntegerField(null=True)
|
||||
|
||||
def __str__(self):
|
||||
return "%s %s %s" % (self.get_level_display(), self.message, self.build)
|
||||
return force_bytes('%s %s %s' % (self.get_level_display(), self.message, self.build))
|
||||
|
||||
def invalidate_cache(**kwargs):
|
||||
from django.core.cache import cache
|
||||
|
||||
Reference in New Issue
Block a user