Skip to content

Commit

Permalink
Autopilot Manager: pass process pid as string when using 'kill'
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani authored and patrickelectric committed Nov 4, 2024
1 parent 7af6764 commit 72537a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/services/ardupilot_manager/autopilot_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ async def prune_ardupilot_processes(self) -> None:
logger.debug(f"Ardupilot appears to be running.. going to call pkill: {error}")

try:
subprocess.run(["kill", "-9", process.pid], check=True)
subprocess.run(["kill", "-9", f"{process.pid}"], check=True)
except Exception as error:
raise AutoPilotProcessKillFail(f"Failed to kill {process.name()}::{process.pid}.") from error

Expand Down

0 comments on commit 72537a5

Please sign in to comment.