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

handle set_message_fields given some non-basic type #68

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

artivis
Copy link
Contributor

@artivis artivis commented Jul 11, 2019

Fix #67

Signed-off-by: artivis jeremie.deray@canonical.com

  Fix ros2#67

Signed-off-by: artivis <jeremie.deray@canonical.com>
@artivis
Copy link
Contributor Author

artivis commented Jul 11, 2019

@jacobperron FYI the else block simplification crashes a test.

_______________________ test_set_message_fields_invalid ________________________
test/rosidl_runtime_py/test_set_message.py:93: in test_set_message_fields_invalid
    set_message_fields(msg, invalid_type)
../../../../build/rosidl_runtime_py/rosidl_runtime_py/set_message.py:45: in set_message_fields
    set_message_fields(value, field_value)
../../../../build/rosidl_runtime_py/rosidl_runtime_py/set_message.py:36: in set_message_fields
    for field_name, field_value in values.items():
E   AttributeError: 'str' object has no attribute 'items'

@jacobperron
Copy link
Member

@jacobperron FYI the else block simplification crashes a test.

My bad. We still need to guard against invalid assignments.

Copy link
Member

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@jacobperron jacobperron merged commit 2d8af1e into ros2:master Jul 12, 2019
@artivis artivis deleted the fix/67 branch July 12, 2019 11:54
jacobperron pushed a commit that referenced this pull request Sep 5, 2019
Fix #67

Signed-off-by: artivis <jeremie.deray@canonical.com>
jacobperron pushed a commit that referenced this pull request Sep 5, 2019
Fix #67

Signed-off-by: artivis <jeremie.deray@canonical.com>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron added a commit that referenced this pull request Sep 5, 2019
Fix #67

Signed-off-by: artivis <jeremie.deray@canonical.com>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron pushed a commit to ros2/rosidl_runtime_py that referenced this pull request Sep 19, 2019
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.

set_message_fields given non-basic type
2 participants