summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/event.py
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/event.py
parentd7c9b7d8b90f58705843f8bedcf8eb2d26da1bdd (diff)
downloadpoky-fd42ffa273396b3ba425fe34cc43b62d540187fe.tar.gz
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/event.py')
-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 7251d78715..b0750e826e 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -22,7 +22,7 @@ BitBake build tools.
22# with this program; if not, write to the Free Software Foundation, Inc., 22# with this program; if not, write to the Free Software Foundation, Inc.,
23# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 23# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 24
25import os, re 25import os, re, sys
26import bb.utils 26import bb.utils
27import pickle 27import pickle
28 28
@@ -80,8 +80,11 @@ def fire(event, d):
80 80
81def worker_fire(event, d): 81def worker_fire(event, d):
82 data = "<event>" + pickle.dumps(event) + "</event>" 82 data = "<event>" + pickle.dumps(event) + "</event>"
83 if os.write(worker_pipe, data) != len (data): 83 try:
84 print "Error sending event to server (short write)" 84 if os.write(worker_pipe, data) != len (data):
85 print "Error sending event to server (short write)"
86 except OSError:
87 sys.exit(1)
85 88
86def fire_from_worker(event, d): 89def fire_from_worker(event, d):
87 if not event.startswith("<event>") or not event.endswith("</event>"): 90 if not event.startswith("<event>") or not event.endswith("</event>"):