Skip to content

Commit

Permalink
Fix #889 : Exclude unused args check if pass_all_args is set (#1520)
Browse files Browse the repository at this point in the history
* Exclude unused args check if pass_all_args is set

* Add test for pass_all_args fix
  • Loading branch information
alextoind authored and dirk-thomas committed Nov 20, 2018
1 parent b6b22e8 commit b1713cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/roslaunch/src/roslaunch/xmlloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,9 @@ def _include_tag(self, tag, context, ros_config, default_machine, is_core, verbo
self._recurse_load(ros_config, launch.childNodes, child_ns, \
default_machine, is_core, verbose)

# check for unused args
loader.post_process_include_args(child_ns)
if not pass_all_args:
# check for unused args
loader.post_process_include_args(child_ns)

except ArgException as e:
raise XmlParseException("included file [%s] requires the '%s' arg to be set"%(inc_filename, str(e)))
Expand Down
1 change: 1 addition & 0 deletions tools/roslaunch/test/xml/test-arg-valid-include.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<launch>
<arg name="another_parameter_not_used" value="dummy"/>
<arg name="grounded" value="not_set"/>
<include file="$(find roslaunch)/test/xml/test-arg-invalid-included.xml" pass_all_args="true"/>
</launch>
Expand Down

0 comments on commit b1713cf

Please sign in to comment.