Skip to content

Commit

Permalink
[middleware] ros/yarp: fix port/topic names for 3 dots in name
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Aug 29, 2012
1 parent ec63a6f commit 594dd33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/morse/middleware/ros_mw.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ def topic_name(self, component_instance):
# Check if the component_name is a full qualified name or not
# For that, check the number of . in its name. If it is more
# than 2, we are sure it is a qualified name. If it is 0, it is
# definitevely not one. If it is 1, check that the end is not a
# definitively not one. If it is 1, check that the end is not a
# string of kind 0XY.

fqn = False
s = component_name.split(".")
size = len(s)
if size > 3:
if size > 2:
fqn = True
elif size == 2:
last = s[-1]
Expand Down
2 changes: 1 addition & 1 deletion src/morse/middleware/yarp_mw.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def register_component(self, component_name, component_instance, mw_data):
fqn = False
s = component_name.split(".")
size = len(s)
if size > 3:
if size > 2:
fqn = True
elif size == 2:
last = s[-1]
Expand Down

0 comments on commit 594dd33

Please sign in to comment.