diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-21 16:00:12 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-21 16:00:12 +0000 |
commit | fd42ffa273396b3ba425fe34cc43b62d540187fe (patch) | |
tree | a66e03d8cc1002c307e9d7efe672a8afe6eeb63f /bitbake | |
parent | d7c9b7d8b90f58705843f8bedcf8eb2d26da1bdd (diff) | |
download | poky-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')
-rw-r--r-- | bitbake/lib/bb/event.py | 9 |
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 | ||
25 | import os, re | 25 | import os, re, sys |
26 | import bb.utils | 26 | import bb.utils |
27 | import pickle | 27 | import pickle |
28 | 28 | ||
@@ -80,8 +80,11 @@ def fire(event, d): | |||
80 | 80 | ||
81 | def worker_fire(event, d): | 81 | def 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 | ||
86 | def fire_from_worker(event, d): | 89 | def 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>"): |