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]

Signed-off-by: Mathieu Dubois-Briand <[email protected]>
---
 meta/lib/oeqa/utils/qemurunner.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py 
b/meta/lib/oeqa/utils/qemurunner.py
index 98a11e1a2c3c..6cab9aa6b202 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -746,8 +746,10 @@ class LoggingThread(threading.Thread):
     def threadtarget(self):
         try:
             self.eventloop()
-        except Exception as e:
-            self.logger.warning("Exception %s in logging thread" % 
traceback.format_exception(e))
+        except Exception:
+            exc_type, exc_value, exc_traceback = sys.exc_info()
+            self.logger.warning("Exception %s in logging thread" %
+                                traceback.format_exception(exc_type, 
exc_value, exc_traceback))
         finally:
             self.teardown()
 

---
base-commit: 942b6ab25f0c1df02920997b63db89187fbdeea1
change-id: 20241206-mathieu-qemurunner_exception-e7255b153505

Best regards,
-- 
Mathieu Dubois-Briand <[email protected]>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#208433): 
https://lists.openembedded.org/g/openembedded-core/message/208433
Mute This Topic: https://lists.openembedded.org/mt/109961096/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to