aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhixiong Chi <zhixiong.chi@windriver.com>2017-04-12 11:29:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-12 16:13:48 +0100
commit4fca9a07f2d6b0544977112672b786982d7bb8f2 (patch)
tree0aea41a247b69f5996e81cbd004994f3278ffa45
parentedf6e6094a9f7ad4b2ba06eef8fd34756edbedce (diff)
downloadbitbake-4fca9a07f2d6b0544977112672b786982d7bb8f2.zip
bitbake-4fca9a07f2d6b0544977112672b786982d7bb8f2.tar.gz
bitbake-4fca9a07f2d6b0544977112672b786982d7bb8f2.tar.bz2
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" Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbin/bitbake-layers2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/bitbake-layers b/bin/bitbake-layers
index 390ad05..2b05d28 100755
--- a/bin/bitbake-layers
+++ b/bin/bitbake-layers
@@ -24,6 +24,7 @@ import logging
import os
import sys
import argparse
+import signal
bindir = os.path.dirname(__file__)
topdir = os.path.dirname(bindir)
@@ -35,6 +36,7 @@ import bb.msg
logger = bb.msg.logger_create('bitbake-layers', sys.stdout)
def main():
+ signal.signal(signal.SIGPIPE, signal.SIG_DFL)
parser = argparse.ArgumentParser(
description="BitBake layers utility",
epilog="Use %(prog)s <subcommand> --help to get help on a specific command",