Skip to content

Commit

Permalink
Do not fail in no _config is defined
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
j-rivero committed Jun 7, 2024
1 parent e08db8a commit c3159bb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions ros_buildfarm/config/build_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,20 @@ def __init__(self, name, data): # noqa: D107
assert isinstance(self.tag_blacklist, list)

self.targets = {}
self.custom_rosdep_urls = []
for os_name in data.get('targets', {}).keys():
if os_name == '_config':
continue
if 'custom_rosdep_urls' in data['targets']['_config']:
self.custom_rosdep_urls = \
data['targets']['_config']['custom_rosdep_urls']
assert isinstance(self.custom_rosdep_urls, list)
self.targets[os_name] = {}
for os_code_name in data['targets'][os_name].keys():
self.targets[os_name][os_code_name] = {}
for arch in data['targets'][os_name][os_code_name].keys():
self.targets[os_name][os_code_name][arch] = \
data['targets'][os_name][os_code_name][arch]

self.custom_rosdep_urls = []
if '_config' in data['targets']:
if 'custom_rosdep_urls' in data['targets']['_config']:
self.custom_rosdep_urls = \
data['targets']['_config']['custom_rosdep_urls']
assert isinstance(self.custom_rosdep_urls, list)

self.shared_ccache = False
if 'shared_ccache' in data:
self.shared_ccache = bool(data['shared_ccache'])
Expand Down

0 comments on commit c3159bb

Please sign in to comment.