From 0e019e0a604e7c49836a6254c8cffcac933ee2cc Mon Sep 17 00:00:00 2001 From: Peter Baughman Date: Thu, 31 May 2018 23:27:33 +0000 Subject: [PATCH] Make a copy of the topic list get_topics() returns a set, which is iterated by the Log constructor. Make a copy of the set (atomic in cpython!) so nobody adds or removes something while the Log constructor iterates over it --- clients/rospy/src/rospy/impl/rosout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/rospy/src/rospy/impl/rosout.py b/clients/rospy/src/rospy/impl/rosout.py index 4514031809..a827e1c827 100644 --- a/clients/rospy/src/rospy/impl/rosout.py +++ b/clients/rospy/src/rospy/impl/rosout.py @@ -95,7 +95,7 @@ def _rosout(level, msg, fname, line, func): disable_topics_ = False if not disable_topics_: - topics = get_topic_manager().get_topics() + topics = get_topic_manager().get_topics().copy() else: topics = ""