change exception

This commit is contained in:
RangeOfGlitching
2023-02-09 23:56:57 +08:00
parent 66581e37d2
commit 1a072d3715
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ if __name__ == '__main__':
try: try:
rospy.spin() rospy.spin()
except KeyboardInterrupt as e: except Exception as e:
client.disconnect() client.disconnect()
logger.info("End of program") logger.info("End of program")
sys.exit() sys.exit()
+1 -1
View File
@@ -93,7 +93,7 @@ if __name__ == '__main__':
try: try:
client.loop_start() client.loop_start()
rospy.spin() rospy.spin()
except KeyboardInterrupt: except Exception as e:
client.loop_stop() client.loop_stop()
client.disconnect() client.disconnect()
logger.info("End of program") logger.info("End of program")