From 756e45cda28bb798f13aeb7157a9a694912c2142 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 10 Nov 2021 22:48:43 +1100 Subject: [PATCH] autotest: add get_stacktrace method --- Tools/autotest/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index babb13a20f..d0d3db75ff 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -6001,6 +6001,9 @@ Also, ignores heartbeats not from our target system''' text = text.encode('ascii') self.mav.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_WARNING, text) + def get_stacktrace(self): + return ''.join(traceback.format_stack()) + def get_exception_stacktrace(self, e): if sys.version_info[0] >= 3: ret = "%s\n" % e