From e0daf784082f27372effa04e987ba7376a26175a Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 17 Aug 2015 12:12:17 +0100 Subject: bitbake: 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. (Bitbake rev: 95e391acbc3b4efd6c77637a1ce815012ae0f09b) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/command.py') diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 24ff341045..a7cac97e2d 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/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: -- cgit 1.2.3-korg