Skip to content

Commit

Permalink
fix package mapping for mapping rules with additional keys
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmann-stefan committed Oct 30, 2024
1 parent 52c3a7c commit 53078d3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ros1_bridge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,7 @@ def __init__(self, data, expected_package_name):
self.ros1_package_name = data['ros1_package_name']
self.ros2_package_name = data['ros2_package_name']
self.foreign_mapping = bool(data.get('enable_foreign_mappings'))
self.package_mapping = (
len(data) == (2 + int('enable_foreign_mappings' in data))
)
self.package_mapping = self.ros1_package_name != self.ros2_package_name
else:
raise MappingException(
'Ignoring a rule without a ros1_package_name and/or ros2_package_name')
Expand Down

0 comments on commit 53078d3

Please sign in to comment.