Make java-event-log-tags.py create its output directory if it does not exist.

Change-Id: I88ca3e6e70d1ff9db8f1328f18c36abc196e1aad
This commit is contained in:
Sean Dykeman 2011-12-12 17:42:55 -08:00 committed by Doug Zongker
parent 6a7c6064c2
commit 6da9ef6996
1 changed files with 5 additions and 0 deletions

View File

@ -26,6 +26,7 @@ tags in the given input file.
import cStringIO
import getopt
import os
import os.path
import re
import sys
@ -144,4 +145,8 @@ for t in tagfile.tags:
buffer.write("}\n");
output_dir = os.path.dirname(output_file)
if not os.path.exists(output_dir):
os.makedirs(output_dir)
event_log_tags.WriteOutput(output_file, buffer)