Skip to content

Commit

Permalink
Remove the loop parameter from async.sleep. (#155)
Browse files Browse the repository at this point in the history
This removes a warning of the form:

test/test_launch_ros/test_track_node_names.py::test_launch_nodes_with_different_names
  Warning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
  • Loading branch information
clalancette authored Jun 25, 2020
1 parent e8894ce commit 3775aa3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _launch(launch_description):
ls = LaunchService()
ls.include_launch_description(launch_description)
launch_task = loop.create_task(ls.run_async())
loop.run_until_complete(asyncio.sleep(5, loop=loop))
loop.run_until_complete(asyncio.sleep(5))
if not launch_task.done():
loop.create_task(ls.shutdown())
loop.run_until_complete(launch_task)
Expand Down

0 comments on commit 3775aa3

Please sign in to comment.