summaryrefslogtreecommitdiffstats
path: root/external/poky/bitbake/lib/bb/ui/taskexp.py
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/bitbake/lib/bb/ui/taskexp.py')
-rw-r--r--external/poky/bitbake/lib/bb/ui/taskexp.py29
1 files changed, 12 insertions, 17 deletions
diff --git a/external/poky/bitbake/lib/bb/ui/taskexp.py b/external/poky/bitbake/lib/bb/ui/taskexp.py
index 8305d70f..05e32338 100644
--- a/external/poky/bitbake/lib/bb/ui/taskexp.py
+++ b/external/poky/bitbake/lib/bb/ui/taskexp.py
@@ -4,27 +4,22 @@
# Copyright (C) 2007 Ross Burton
# Copyright (C) 2007 - 2008 Richard Purdie
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# 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.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
-import gi
-gi.require_version('Gtk', '3.0')
-from gi.repository import Gtk, Gdk, GObject
-from multiprocessing import Queue
+
+try:
+ import gi
+ gi.require_version('Gtk', '3.0')
+ from gi.repository import Gtk, Gdk, GObject
+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 time
import bb
import bb.event
@@ -212,7 +207,7 @@ def main(server, eventHandler, params):
if error:
print("Error running command '%s': %s" % (cmdline, error))
return 1
- elif ret != True:
+ elif not ret:
print("Error running command '%s': returned %s" % (cmdline, ret))
return 1
except client.Fault as x: