Re: [patchtest][PATCH 1/2] patchtest: Fix printing of exception tracebacks


Leonardo Sandoval <leonardo.sandoval.gonzalez@...>
 

LGTM

On 12/5/2019 6:56 AM, Paul Barker wrote:
On Fri, 29 Nov 2019, at 16:09, Paul Barker wrote:
On Fri, 15 Nov 2019, at 13:23, Paul Barker wrote:
The addError() handler is called outside of an actual exception handler
so sys.exc_info() doesn't actually return an exception. This means that
traceback.print_exc() doesn't know what to print. Instead we need to use
traceback.print_exception() with the err object we've been given.

Signed-off-by: Paul Barker <paul@...>
---
patchtest | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/patchtest b/patchtest
index 592f73e..59b19f5 100755
--- a/patchtest
+++ b/patchtest
@@ -101,8 +101,7 @@ def getResult(patch, mergepatch):

def addError(self, test, err):
self.test_error = True
- (ty, va, trace) = err
- logger.error(traceback.print_exc())
+ logger.error(traceback.print_exception(*err))

def addFailure(self, test, err):
self.test_failure = True
--
2.17.1

Ping on this and the following patch.
Cc'ing the maintainers listed in the readme along with Changqing Li as discussed during the Yocto Project call on Tuesday.

Could you confirm who's maintaining patchtest these days and update the readme? I've got a few ideas for enhancements and I may be able to assist with maintaining these repositories after the new year but I'd like to get these initial changes in first.

Join yocto@lists.yoctoproject.org to automatically receive all group messages.