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

Commit 312c310f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 7ec2a39c ac9d5df3
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -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()


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