summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>2024-12-06 17:51:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-09 15:23:28 +0000
commit0c8b34b55d299df3f0b2b3d1df6c292d1ce87b62 (patch)
tree1ec7249f062802d7b8aef33287051f8fcaee8d65
parent975861e6a1a0dfa43f59b3b64bf998676e5c417b (diff)
downloadpoky-0c8b34b55d299df3f0b2b3d1df6c292d1ce87b62.tar.gz
qemurunner: Fix stack trace generation in exception handler
Qemurunner exception handling code currently formats the stack trace using traceback.format_exception(), with parameters introduced in python 3.10. This will fail on platforms with an older python version. Change this to the old parameter order, still supported in current python versions. https://docs.python.org/3/library/traceback.html#traceback.format_exception Fixes [YOCTO #15675] (From OE-Core rev: 5f9ecf5f210e967594069f172728fd5b4d5b4f1d) Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 98a11e1a2c..6cab9aa6b2 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -746,8 +746,10 @@ class LoggingThread(threading.Thread):
746 def threadtarget(self): 746 def threadtarget(self):
747 try: 747 try:
748 self.eventloop() 748 self.eventloop()
749 except Exception as e: 749 except Exception:
750 self.logger.warning("Exception %s in logging thread" % traceback.format_exception(e)) 750 exc_type, exc_value, exc_traceback = sys.exc_info()
751 self.logger.warning("Exception %s in logging thread" %
752 traceback.format_exception(exc_type, exc_value, exc_traceback))
751 finally: 753 finally:
752 self.teardown() 754 self.teardown()
753 755