From patchwork Wed Mar 14 09:26:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 09/11] Hob: Emit command-failed signal even if error msg is None Date: Wed, 14 Mar 2012 09:26:40 -0000 From: Dongxiao Xu X-Patchwork-Id: 23301 Message-Id: To: bitbake-devel@lists.openembedded.org Signed-off-by: Dongxiao Xu Signed-off-by: Joshua Lock --- lib/bb/ui/crumbs/builder.py | 13 +++++++------ lib/bb/ui/crumbs/hobeventhandler.py | 5 ++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py index f52b475..1363475 100755 --- a/lib/bb/ui/crumbs/builder.py +++ b/lib/bb/ui/crumbs/builder.py @@ -430,12 +430,13 @@ class Builder(gtk.Window): self.switch_page(self.IMAGE_GENERATED) def handler_command_failed_cb(self, handler, msg): - lbl = "Error\n" - lbl = lbl + "%s\n\n" % msg - dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) - response = dialog.run() - dialog.destroy() + if msg: + lbl = "Error\n" + lbl = lbl + "%s\n\n" % msg + dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING) + dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + response = dialog.run() + dialog.destroy() self.handler.clear_busy() self.configuration.curr_mach = None self.image_configuration_page.switch_machine_combo() diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py index 9c82bfe..cd25754 100644 --- a/lib/bb/ui/crumbs/hobeventhandler.py +++ b/lib/bb/ui/crumbs/hobeventhandler.py @@ -238,9 +238,8 @@ class HobHandler(gobject.GObject): elif isinstance(event, bb.command.CommandFailed): self.commands_async = [] - if self.error_msg: - self.emit("command-failed", self.error_msg) - self.error_msg = "" + self.emit("command-failed", self.error_msg) + self.error_msg = "" elif isinstance(event, (bb.event.ParseStarted, bb.event.CacheLoadStarted, bb.event.TreeDataPreparationStarted,