diff options
| author | Zhixiong Chi <zhixiong.chi@windriver.com> | 2017-04-12 11:29:17 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-13 10:54:37 +0100 |
| commit | bcab5e12c1fa9c6e2d828ddadd3659eceb4b387d (patch) | |
| tree | 2fe78c378db498056c620d527c44ace0ecba99a9 /bitbake/bin/bitbake-layers | |
| parent | 314df06b81fd4dff2e551207682b5821f1c37e48 (diff) | |
| download | poky-bcab5e12c1fa9c6e2d828ddadd3659eceb4b387d.tar.gz | |
bitbake: bitbake-layers: add signal hander to avoid exception
Fixed:
bitbake-layers show-recipes | less
press "q" to exit
There will be a Broken pipe error output as follows:
"BrokenPipeError: [Errno 32] Broken pipe"
(Bitbake rev: 4fca9a07f2d6b0544977112672b786982d7bb8f2)
Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-layers')
| -rwxr-xr-x | bitbake/bin/bitbake-layers | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index 390ad0503d..2b05d28470 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/bin/bitbake-layers | |||
| @@ -24,6 +24,7 @@ import logging | |||
| 24 | import os | 24 | import os |
| 25 | import sys | 25 | import sys |
| 26 | import argparse | 26 | import argparse |
| 27 | import signal | ||
| 27 | 28 | ||
| 28 | bindir = os.path.dirname(__file__) | 29 | bindir = os.path.dirname(__file__) |
| 29 | topdir = os.path.dirname(bindir) | 30 | topdir = os.path.dirname(bindir) |
| @@ -35,6 +36,7 @@ import bb.msg | |||
| 35 | logger = bb.msg.logger_create('bitbake-layers', sys.stdout) | 36 | logger = bb.msg.logger_create('bitbake-layers', sys.stdout) |
| 36 | 37 | ||
| 37 | def main(): | 38 | def main(): |
| 39 | signal.signal(signal.SIGPIPE, signal.SIG_DFL) | ||
| 38 | parser = argparse.ArgumentParser( | 40 | parser = argparse.ArgumentParser( |
| 39 | description="BitBake layers utility", | 41 | description="BitBake layers utility", |
| 40 | epilog="Use %(prog)s <subcommand> --help to get help on a specific command", | 42 | epilog="Use %(prog)s <subcommand> --help to get help on a specific command", |
