Merge "Only run warn.py's main function if it is the main program."

am: 312c310f7c

Change-Id: I4b2c7dce195e62172a81154e261ced167d997ab5
This commit is contained in:
Meike Baumgärtner 2016-09-29 04:06:29 +00:00 committed by android-build-merger
commit ce4e16d835
1 changed files with 10 additions and 6 deletions

View File

@ -2342,10 +2342,14 @@ def dump_csv():
print '{},,{}'.format(total, 'All warnings')
##### Main function starts here. #########################
def main():
parse_input_file()
if args.gencsv:
dump_csv()
else:
dump_html()
parse_input_file()
if args.gencsv:
dump_csv()
else:
dump_html()
# Run main function if warn.py is the main program.
if __name__ == '__main__':
main()