mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 15:14:06 +08:00
fix the encoding problem for subprocess.check_output
This commit is contained in:
parent
6c76f99fe5
commit
8b273b46aa
@ -253,7 +253,7 @@ else:
|
||||
ros2_distro = ""
|
||||
try:
|
||||
rosversion_out = subprocess.check_output(["rosversion", "-d"])
|
||||
rosversion_out = rosversion_out.rstrip()
|
||||
rosversion_out = rosversion_out.rstrip().decode('utf-8')
|
||||
if rosversion_out not in ["<unknown>", "kinetic", "lunar", "melodic"]:
|
||||
ros2_distro = rosversion_out
|
||||
except OSError as e:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user