summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-09-10 17:11:17 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-01 17:12:32 (GMT)
commit4e09d164d9a75929c002d27cc4d9062fe205246a (patch)
tree0f63487260f657dd4c7c0ccf0e3511210cc57dd7
parentd567e770c33c4ff99221f30aa83ec34c46583e14 (diff)
downloadpoky-4e09d164d9a75929c002d27cc4d9062fe205246a.tar.gz
bitbake: hob: ensure error message text is properly escaped
Our lack of markup escaping was causing invalid markup, leading to the error dialog being blank. Use the glib markup escaping function provided by PyGTK+ to do this properly and avoid the blank error dialogs. Partial fix for [YOCTO #2983]. (Bitbake rev: 563ea5233a5ab1629c51e802d04280692f96c596) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index df85326..870831a 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -21,6 +21,7 @@
21# with this program; if not, write to the Free Software Foundation, Inc., 21# with this program; if not, write to the Free Software Foundation, Inc.,
22# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 22# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 23
24import glib
24import gtk 25import gtk
25import copy 26import copy
26import os 27import os
@@ -644,7 +645,7 @@ class Builder(gtk.Window):
644 645
645 def show_error_dialog(self, msg): 646 def show_error_dialog(self, msg):
646 lbl = "<b>Error</b>\n" 647 lbl = "<b>Error</b>\n"
647 lbl = lbl + "%s\n\n" % msg 648 lbl = lbl + "%s\n\n" % glib.markup_escape_text(msg)
648 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR) 649 dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
649 button = dialog.add_button("Close", gtk.RESPONSE_OK) 650 button = dialog.add_button("Close", gtk.RESPONSE_OK)
650 HobButton.style_button(button) 651 HobButton.style_button(button)
@@ -816,7 +817,7 @@ class Builder(gtk.Window):
816 self.build_failed() 817 self.build_failed()
817 818
818 def handler_no_provider_cb(self, running_build, msg): 819 def handler_no_provider_cb(self, running_build, msg):
819 dialog = CrumbsMessageDialog(self, msg, gtk.STOCK_DIALOG_INFO) 820 dialog = CrumbsMessageDialog(self, glib.markup_escape_text(msg), gtk.STOCK_DIALOG_INFO)
820 button = dialog.add_button("Close", gtk.RESPONSE_OK) 821 button = dialog.add_button("Close", gtk.RESPONSE_OK)
821 HobButton.style_button(button) 822 HobButton.style_button(button)
822 dialog.run() 823 dialog.run()