Patchwork [bitbake-devel,2/3] hob.py : implemented handle_sys_exit() for hob

login
register
mail settings
Submitter Andrei Dinu
Date April 15, 2013, 10:38 a.m.
Message ID <1366022295-4744-3-git-send-email-andrei.adrianx.dinu@intel.com>
Download mbox | patch
Permalink /patch/48191/
State New
Headers show

Comments

Andrei Dinu - April 15, 2013, 10:38 a.m.
In order to display the error shown by bitbake in a
dialog rather than in the console, handle_sys_exit()
was implemented in hob ui.

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
---
 bitbake/lib/bb/ui/hob.py |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
index 55bd84c..3053eb0 100755
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -11,8 +11,6 @@ 
 # it under the terms of the GNU General Public License version 2 as
 # published by the Free Software Foundation.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
@@ -22,6 +20,7 @@ 
 
 import sys
 import os
+from bb.ui.crumbs.hig import hoberror
 requirements = "FATAL: Hob requires Gtk+ 2.20.0 or higher, PyGtk 2.21.0 or higher"
 try:
     import gobject
@@ -83,6 +82,11 @@  def main (server = None, eventHandler = None):
     finally:
         hobHandler.cancel_build(force = True)
 
+def handle_sys_exit():
+    dialog = hoberror.HobError(bb.event.ui_queue[len(bb.event.ui_queue)-1].getMessage())
+    bb.event.ui_queue = []
+    dialog.run()
+
 if __name__ == "__main__":
     try:
         ret = main()