mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 13:38:38 -04:00
Tools: autotest: correct statustext sending under Python3
This commit is contained in:
parent
18391d8a9a
commit
a2105e1f81
@ -1782,7 +1782,9 @@ class AutoTest(ABC):
|
||||
self.progress(fmt % (desc, time))
|
||||
|
||||
def send_statustext(self, text):
|
||||
self.mav.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_WARNING, bytes(text))
|
||||
if sys.version_info.major >= 3 and not isinstance(text, bytes):
|
||||
text = bytes(text, "ascii")
|
||||
self.mav.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_WARNING, text)
|
||||
|
||||
def get_exception_stacktrace(self, e):
|
||||
if sys.version_info[0] >= 3:
|
||||
|
Loading…
Reference in New Issue
Block a user