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 BA0416010B for ; Wed, 30 Mar 2016 19:55:44 +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 u2UJti9L023415 for ; Wed, 30 Mar 2016 20:55:44 +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 1RwhCZJ6kfFq for ; Wed, 30 Mar 2016 20:55:44 +0100 (BST) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u2UJtgak023403 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Wed, 30 Mar 2016 20:55:43 +0100 Message-ID: <1459367742.21672.60.camel@linuxfoundation.org> From: Richard Purdie To: openembedded-core Date: Wed, 30 Mar 2016 20:55:42 +0100 X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Subject: [PATCH] sanity.bbclass: Use pythonexception to raise real exceptions without backtraces X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 19:55:47 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit If the sanity code encounters a version change is doesn't understand, the current output is unreadable and confusing for the user, particularly due to the presence of the backtrace. Use improved functionality in bitbake to improve this and correctly pass python exceptions around. [YOCTO #9291] Signed-off-by: Richard Purdie diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index a400bca..662f764 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -563,10 +563,10 @@ def sanity_check_conffiles(status, d): d.getVar(current_version, True) != d.getVar(required_version, True): success = True try: - bb.build.exec_func(func, d) + bb.build.exec_func(func, d, pythonexception=True) except NotImplementedError as e: success = False - status.addresult(e.msg) + status.addresult(str(e)) if success: status.reparse = True -- cgit v0.10.2