summaryrefslogtreecommitdiffstats
path: root/lib/bb/command.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-08-17 12:12:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-17 14:40:55 +0100
commit95e391acbc3b4efd6c77637a1ce815012ae0f09b (patch)
tree845ea8326ec331ab81a5d220a35b9891b2a4fe4f /lib/bb/command.py
parent7859f7388f2e3f675d0e1527cfde18625f36f637 (diff)
downloadbitbake-contrib-95e391acbc3b4efd6c77637a1ce815012ae0f09b.tar.gz
command: intercept SystemExit to avoid trashing the server
If sys.exit() is called within a command run over XMLRPC, the XMLRPC server is effectively trashed (apparently listening but no longer able to respond to commands). We need to intercept the SystemExit exception and deal with it as we would any other exception. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/command.py')
-rw-r--r--lib/bb/command.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 24ff34104..a7cac97e2 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -71,7 +71,7 @@ class Command:
result = command_method(self, commandline)
except CommandError as exc:
return None, exc.args[0]
- except Exception:
+ except (Exception, SystemExit):
import traceback
return None, traceback.format_exc()
else: