Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac9d5df3 authored by Meike Baumgärtner's avatar Meike Baumgärtner
Browse files

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

Test: run warn.py --byproject build.log
Change-Id: I155cce8c952d6d8a02c8e1809bf61a46c847c26e
parent 6e12b729
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -2333,10 +2333,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()


# Run main function if warn.py is the main program.
if __name__ == '__main__':
  main()