Skip to content
Snippets Groups Projects
Commit eb18e97c authored by Emil Harlan's avatar Emil Harlan
Browse files

a

parent 7573ccc2
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,9 @@ class CommandExecutor(Node):
process_handle = subprocess.Popen(launch_command, shell=True)
self.running_processes[name] = process_handle
process_handle.wait() # Wait for the process to finish
del self.running_processes[name] # Remove from the dictionary when done
if name in self.running_processes:
del self.running_processes[name] # Remove from the dictionary when done
except Exception as e:
self.get_logger().error(f"Failed to execute command: {e}")
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment