mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 09:32:17 +02:00
bitbake: lib/ui/taskexp: Validate gi import
When running bitbake -g -u taskexp without having gi python module or and invalid gtk version, bitbake fails with a stack trace. In case of import or version error, bitbake should exit with an error message instead of a stack trace. (Bitbake rev: 2a2c507f239b047f34765312df4168030e38b90d) Signed-off-by: David Khouya <dakhouya@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8b6b95106a
commit
64f2361c5b
@@ -8,9 +8,15 @@
|
||||
#
|
||||
|
||||
import sys
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk, Gdk, GObject
|
||||
|
||||
try:
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
except ValueError:
|
||||
sys.exit("FATAL: Gtk version needs to be 3.0")
|
||||
except ImportError:
|
||||
sys.exit("FATAL: Gtk ui could not load the required gi python module")
|
||||
|
||||
import threading
|
||||
from xmlrpc import client
|
||||
import bb
|
||||
|
||||
Reference in New Issue
Block a user