From c51ed5d7a9971fad6019dac6c35a71b8a54ab16a Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 10 Dec 2010 16:53:19 -0700 Subject: Rename command events, adjust compareRevisions - Moved the logic for comparing revisions from cooker into command - Removed 'Cooker' from the event names - Renamed the 'ExitCode' event into CommandExit, and changed CommandFailed to be a subclass of CommandExit Signed-off-by: Chris Larson --- lib/bb/ui/depexp.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/bb/ui/depexp.py') diff --git a/lib/bb/ui/depexp.py b/lib/bb/ui/depexp.py index f0297a3bc..967f30790 100644 --- a/lib/bb/ui/depexp.py +++ b/lib/bb/ui/depexp.py @@ -21,6 +21,8 @@ import gobject import gtk import threading import xmlrpclib +import bb +import bb.event from bb.ui.crumbs.progress import ProgressBar # Package Model @@ -236,11 +238,13 @@ def main(server, eventHandler): parse(event._depgraph, dep.pkg_model, dep.depends_model) gtk.gdk.threads_leave() - if isinstance(event, bb.command.CookerCommandCompleted): + if isinstance(event, bb.command.CommandCompleted): continue - if isinstance(event, bb.command.CookerCommandFailed): + if isinstance(event, bb.command.CommandFailed): print("Command execution failed: %s" % event.error) - break + return event.exitcode + if isinstance(event, bb.command.CommandExit): + return event.exitcode if isinstance(event, bb.cooker.CookerExit): break -- cgit 1.2.3-korg