All of lore.kernel.org
 help / color / mirror / Atom feed
From: Constantin Musca <constantinx.musca@intel.com>
To: bitbake-devel@lists.openembedded.org
Cc: Constantin Musca <constantinx.musca@intel.com>
Subject: [PATCH] hob/hobeventhandler: Throw an exception if runCommand fails
Date: Thu,  4 Oct 2012 08:15:52 +0300	[thread overview]
Message-ID: <1349327752-25155-1-git-send-email-constantinx.musca@intel.com> (raw)

- throw a Hob exception if runCommand returns 'Busy' or
'No such command'

[YOCTO #1245]

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
---
 bitbake/lib/bb/ui/crumbs/hobeventhandler.py |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index e8d7dc2..2ce5b66 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -101,7 +101,12 @@ class HobHandler(gobject.GObject):
 
     def runCommand(self, commandline):
         try:
-            return self.server.runCommand(commandline)
+            result = self.server.runCommand(commandline)
+            result_str = str(result)
+            if (result_str.startswith("Busy (") or
+                    result_str == "No such command"):
+                raise Exception(result_str)
+            return result
         except Exception as e:
             self.commands_async = []
             self.clear_busy()
-- 
1.7.9.5




             reply	other threads:[~2012-10-04  6:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04  5:15 Constantin Musca [this message]
2012-10-04 13:00 ` [PATCH] hob/hobeventhandler: Throw an exception if runCommand fails Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349327752-25155-1-git-send-email-constantinx.musca@intel.com \
    --to=constantinx.musca@intel.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.