summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-21 16:00:12 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-21 16:00:12 +0000
commitfd42ffa273396b3ba425fe34cc43b62d540187fe (patch)
treea66e03d8cc1002c307e9d7efe672a8afe6eeb63f /bitbake/lib/bb
parentd7c9b7d8b90f58705843f8bedcf8eb2d26da1bdd (diff)
downloadopenembedded-core-fd42ffa273396b3ba425fe34cc43b62d540187fe.tar.gz
openembedded-core-fd42ffa273396b3ba425fe34cc43b62d540187fe.tar.bz2
openembedded-core-fd42ffa273396b3ba425fe34cc43b62d540187fe.tar.xz
openembedded-core-fd42ffa273396b3ba425fe34cc43b62d540187fe.zip
bitbake/event: If the server disappears, we just exit too
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/event.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 7251d7871..b0750e826 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -22,7 +22,7 @@ BitBake build tools.
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import os, re
+import os, re, sys
import bb.utils
import pickle
@@ -80,8 +80,11 @@ def fire(event, d):
def worker_fire(event, d):
data = "<event>" + pickle.dumps(event) + "</event>"
- if os.write(worker_pipe, data) != len (data):
- print "Error sending event to server (short write)"
+ try:
+ if os.write(worker_pipe, data) != len (data):
+ print "Error sending event to server (short write)"
+ except OSError:
+ sys.exit(1)
def fire_from_worker(event, d):
if not event.startswith("<event>") or not event.endswith("</event>"):