[bitbake-devel] [PATCH 2/3] hob.py : implemented handle_sys_exit() for hob
Andrei Dinu
andrei.adrianx.dinu at intel.com
Mon Apr 15 10:38:14 UTC 2013
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 at intel.com>
---
bitbake/lib/bb/ui/hob.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
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()
--
1.7.9.5
More information about the bitbake-devel
mailing list