Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use yaml.safe_load (round2) #229

Merged
merged 2 commits into from
May 1, 2019
Merged

Conversation

mikaelarguedas
Copy link
Member

Follow-up of #212 for uses of yaml.load introduced since

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@mikaelarguedas mikaelarguedas added in progress Actively being worked on (Kanban column) in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels May 1, 2019
@@ -24,7 +24,7 @@ def get_parameter_value(*, string_value):
"""Guess the desired type of the parameter based on the string value."""
value = ParameterValue()
try:
yaml_value = yaml.load(string_value)
yaml_value = yaml.stafe_load(string_value)
Copy link
Contributor

Choose a reason for hiding this comment

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

stafe_load -> safe_load

Copy link
Member Author

Choose a reason for hiding this comment

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

aaarg, sorry about that 😖 fat fingers

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@sloretz
Copy link
Contributor

sloretz commented May 1, 2019

PR job covered linters, so I'm merging since a couple local tests LGTM (at least the issues they show aren't caused by this PR)

$ ros2 run demo_nodes_cpp listener
$ ros2 param set /listener use_sim_time false
Failed to load entry point 'standalone': module 'ros2component.verb.standalone' has no attribute 'StandaloneVerb'
Set parameter successful
$ ros2 run examples_rclcpp_minimal_action_server action_server_not_composable 
Failed to load entry point 'standalone': module 'ros2component.verb.standalone' has no attribute 'StandaloneVerb'
[INFO] [server]: Got goal request with order 10
[INFO] [server]: Executing goal
[INFO] [server]: Publish Feedback
[INFO] [server]: Publish Feedback
[INFO] [server]: Publish Feedback
[INFO] [server]: Publish Feedback
[INFO] [server]: Publish Feedback
[INFO] [server]: Publish Feedback
[INFO] [server]: Publish Feedback
[INFO] [server]: Publish Feedback
[INFO] [server]: Publish Feedback
[INFO] [server]: Goal Succeeded
$ ros2 action send_goal /fibonacci example_interfaces/Fibonacci '{order: 10}'
Failed to load entry point 'standalone': module 'ros2component.verb.standalone' has no attribute 'StandaloneVerb'
Waiting for an action server to become available...
Sending goal:
     order: 10

Goal accepted with ID: 1765e9d176db4b10b148aed8d9726929

Result:
    sequence: [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]

Goal finished with status: SUCCEEDED
Canceling goal...
Failed to cancel goal
Exception ignored in: <bound method SignalHandlerGuardCondition.__del__ of <rclpy.signals.SignalHandlerGuardCondition object at 0x7fc2a7f8b4e0>>
Traceback (most recent call last):
  File "/home/sloretz/ws/ros2/install/rclpy/lib/python3.6/site-packages/rclpy/signals.py", line 29, in __del__
  File "/home/sloretz/ws/ros2/install/rclpy/lib/python3.6/site-packages/rclpy/signals.py", line 36, in destroy
ValueError: Guard condition was not registered

@sloretz sloretz merged commit 861cefd into ros2:master May 1, 2019
@sloretz sloretz removed the in review Waiting for review (Kanban column) label May 1, 2019
esteve pushed a commit to esteve/ros2cli that referenced this pull request Dec 16, 2022
The importlib_metadata package is a backport of the importlib.metadata
module from Python 3.8. We should prefer the one coming from Python
itself, and fall back to the backport if Python doesn't provide it.

Since this could mean an additional dependency on some platforms, we
should also declare that dependency.

Signed-off-by: Scott K Logan <logans@cottsay.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants