From 8ec81914de97bd8e7d2453ce005cb62bdaf9142c Mon Sep 17 00:00:00 2001 From: Rein Appeldoorn Date: Fri, 4 Oct 2024 15:17:45 +0200 Subject: [PATCH] fix(shutdown): catch shutdown KeyboardInterrupt --- rosboard/rosboard.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rosboard/rosboard.py b/rosboard/rosboard.py index a0b6a1d..292df3d 100755 --- a/rosboard/rosboard.py +++ b/rosboard/rosboard.py @@ -99,7 +99,10 @@ def __init__(self, node_name = "rosboard_node"): rospy.loginfo("ROSboard listening on :%d" % self.port) def start(self): - rospy.spin() + try: + rospy.spin() + except KeyboardInterrupt: + pass def get_msg_class(self, msg_type): """