From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id D038E75A04 for ; Fri, 19 Jun 2015 11:26:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t5JBQcJL015352 for ; Fri, 19 Jun 2015 12:26:38 +0100 Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YUC1UgO1Fm10 for ; Fri, 19 Jun 2015 12:26:38 +0100 (BST) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t5JBQPTx015345 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 19 Jun 2015 12:26:36 +0100 Message-ID: <1434713185.14710.116.camel@linuxfoundation.org> From: Richard Purdie To: bitbake-devel Date: Fri, 19 Jun 2015 12:26:25 +0100 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Subject: [PATCH] server/process: Don't log BBHandledException X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 11:26:38 -0000 Content-Type: multipart/alternative; boundary="=-WbGMLaq/C+M+tGQxYBh/" --=-WbGMLaq/C+M+tGQxYBh/ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit If we see a BBHandledException in the idle handler, the understanding is the system handled it, printing a log and traceback is just confusing. Therefore only print these in the cases where its an unknown/unhandled exception. Signed-off-by: Richard Purdie diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index c9286dd..ef3ee57 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py @@ -144,8 +144,9 @@ class ProcessServer(Process, BaseImplServer): fds = fds + retval except SystemExit: raise - except Exception: - logger.exception('Running idle function') + except Exception as exc: + if not isinstance(exc, bb.BBHandledException): + logger.exception('Running idle function') del self._idlefuns[function] self.quit = True --=-WbGMLaq/C+M+tGQxYBh/ Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit
If we see a BBHandledException in the idle handler, the understanding
is the system handled it, printing a log and traceback is just confusing.

Therefore only print these in the cases where its an unknown/unhandled
exception.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index c9286dd..ef3ee57 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -144,8 +144,9 @@ class ProcessServer(Process, BaseImplServer):
                     fds = fds + retval
             except SystemExit:
                 raise
-            except Exception:
-                logger.exception('Running idle function')
+            except Exception as exc:
+                if not isinstance(exc, bb.BBHandledException):
+                    logger.exception('Running idle function')
                 del self._idlefuns[function]
                 self.quit = True
 

--=-WbGMLaq/C+M+tGQxYBh/--