Skip to content

Commit

Permalink
Make a copy of the topic list
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Peter Baughman committed May 31, 2018
1 parent e1d4a16 commit 0e019e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clients/rospy/src/rospy/impl/rosout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""

Expand Down

0 comments on commit 0e019e0

Please sign in to comment.