Skip to content

Commit 68b9f91

Browse files
committed
Create output dir if it doesn't exist
1 parent f72a52b commit 68b9f91

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

generator/mavgen.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ def mavgen_validate(xmlfile):
241241

242242
print("Found %u MAVLink message types in %u XML files" % (
243243
mavparse.total_msgs(xml), len(xml)))
244+
245+
# ensure output directory exists
246+
os.makedirs(opts.output, exist_ok=True)
244247

245248
# convert language option to lowercase and validate
246249
opts.language = opts.language.lower()

0 commit comments

Comments
 (0)