Skip to content

Commit

Permalink
Create generated folder explicitly
Browse files Browse the repository at this point in the history
Required because output files are now copied in using
`update_output_file` instead of being created by `expand_template`.
  • Loading branch information
abencz committed Jan 19, 2024
1 parent f7b36e4 commit 8a90a8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ros1_bridge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def _generate_cpp(output_path, template_dir, temporary_dir):
data.update(generate_actions(
rospack, message_string_pairs=message_string_pairs))

# create output folder if it doesn't exist
if not os.path.exists(output_path):
os.makedirs(output_path)

template_file = os.path.join(template_dir, 'get_mappings.cpp.em')
temporary_file = os.path.join(temporary_dir, 'get_mappings.cpp')
output_file = os.path.join(output_path, 'get_mappings.cpp')
Expand Down

0 comments on commit 8a90a8e

Please sign in to comment.