Skip to content

Commit

Permalink
fix: remove json encoding before setting string params (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
travipross authored Aug 24, 2020
1 parent a74a2bd commit ed37542
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Contributors
* Brandon Alexander (baalexander@gmail.com)
* David Bertram (davidbertram@gmx.de)
* Matthias Gruhler (matthias.gruhler@ipa.fraunhofer.de)
* Travis Prosser (travisprosser@gmail.com)
1 change: 1 addition & 0 deletions rosapi/src/rosapi/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def set_param(node_name, name, value, params_glob):
d = None
try:
d = loads(value)
value = d if isinstance(d, str) else value
except ValueError:
raise Exception("Due to the type flexibility of the ROS parameter server, the value argument to set_param must be a JSON-formatted string.")

Expand Down

0 comments on commit ed37542

Please sign in to comment.