forked from openkylin/platform_build
Merge "Only run warn.py's main function if it is the main program."
This commit is contained in:
commit
312c310f7c
|
@ -2342,10 +2342,14 @@ def dump_csv():
|
||||||
print '{},,{}'.format(total, 'All warnings')
|
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:
|
# Run main function if warn.py is the main program.
|
||||||
dump_csv()
|
if __name__ == '__main__':
|
||||||
else:
|
main()
|
||||||
dump_html()
|
|
||||||
|
|
Loading…
Reference in New Issue