forked from Archive/PX4-Autopilot
uorb_to_ros_msgs: delete all messages on the out dir first, so it can also consider message deletions on the input dir
This commit is contained in:
parent
5c17a0b205
commit
de917bae6d
|
@ -54,6 +54,12 @@ output_dir = sys.argv[2]
|
|||
|
||||
if not os.path.exists(os.path.abspath(output_dir)):
|
||||
os.mkdir(os.path.abspath(output_dir))
|
||||
else:
|
||||
ros_msg_dir = os.path.abspath(output_dir)
|
||||
msg_files = os.listdir(ros_msg_dir)
|
||||
for msg in msg_files:
|
||||
if msg.endswith(".msg"):
|
||||
os.remove(os.path.join(ros_msg_dir, msg))
|
||||
|
||||
msg_list = list()
|
||||
|
||||
|
|
Loading…
Reference in New Issue