autotest: add get_stacktrace method

This commit is contained in:
Peter Barker 2021-11-10 22:48:43 +11:00 committed by Peter Barker
parent 4f053bb7d5
commit 756e45cda2

View File

@ -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