You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Guess the desired type of the parameter based on the string value."""
value=ParameterValue()
try:
yaml_value=yaml.safe_load(string_value)
exceptyaml.parser.ParserError:
yaml_value=string_value
Steps to reproduce issue
The current implementation has an extra yaml.safe_load for parameter value which has been loaded once already.
This will result in wrong results, e.g.,
key: ''
is once being loaded to {"key": ""}. Another load for the empty string "" will convert it into None.
Implementation considerations
Consider removing the extra yaml load.
The text was updated successfully, but these errors were encountered:
Bug report
Required Info:
ros2cli/ros2param/ros2param/api/__init__.py
Lines 59 to 65 in 28d73d2
Steps to reproduce issue
The current implementation has an extra
yaml.safe_load
for parameter value which has been loaded once already.This will result in wrong results, e.g.,
is once being loaded to
{"key": ""}
. Another load for the empty string""
will convert it intoNone
.Implementation considerations
Consider removing the extra yaml load.
The text was updated successfully, but these errors were encountered: