[bitbake-devel] [PATCH 09/11] Hob: Emit command-failed signal even if error msg is None
Joshua Lock
josh at linux.intel.com
Wed Mar 14 19:37:34 UTC 2012
On 14/03/12 02:26, Dongxiao Xu wrote:
> Signed-off-by: Dongxiao Xu<dongxiao.xu at intel.com>
Signed-off-by: Joshua Lock <josh at linux.intel.com>
> ---
> 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 = "<b>Error</b>\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 = "<b>Error</b>\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,
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
More information about the bitbake-devel
mailing list