Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-labs committed Jul 8, 2024
1 parent 9984eb4 commit 0797252
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ def set_expected_value(self, expected_value_string):
error_string = ""
try:
parsed_value = literal_eval("".join(expected_value_string.split('\\')))
msg = get_ros_message_type(self.topic_type)()
if self.member_name == "":
self.expected_value = self.topic_type()
self.expected_value = msg
set_message_fields(self.expected_value, parsed_value)
else:
msg = get_ros_message_type(self.topic_type)()
self.expected_value = getattr(msg, self.member_name)
error_string = f"Member {self.member_name} is expected to be of type {type(self.expected_value).__name__}. "
if type(self.expected_value).__name__ in dir(builtins):
Expand Down

0 comments on commit 0797252

Please sign in to comment.