Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions xacro/substitution_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

import math
import os
import shlex
import yaml

from io import StringIO
Expand Down Expand Up @@ -333,10 +334,10 @@ def _resolve_args(arg_str, context, commands):
resolved = arg_str
for a in _collect_args(arg_str):
splits = [s for s in a.split(' ') if s]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please check wheather splitting on any whitespace already resolves the problem too:

Suggested change
splits = [s for s in a.split(' ') if s]
splits = [s for s in a.split() if s]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! That works. Fixed in d088535.

if not splits[0] in valid:
if splits[0].strip() not in valid:
raise SubstitutionException('Unknown substitution command [%s]. '
'Valid commands are %s' % (a, valid))
command = splits[0]
'Valid commands are %s' % (splits[0], valid))
command = splits[0].strip()
args = splits[1:]
if command in commands:
resolved = commands[command](resolved, a, args, context)
Expand Down