OLD | NEW |
1 #!/usr/bin/python2 | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 ''' | 6 ''' |
7 Checks a policy_templates.json file for conformity to its syntax specification. | 7 Checks a policy_templates.json file for conformity to its syntax specification. |
8 ''' | 8 ''' |
9 | 9 |
10 import json | 10 import json |
11 import optparse | 11 import optparse |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 (options, args) = parser.parse_args(argv) | 406 (options, args) = parser.parse_args(argv) |
407 if filename is None: | 407 if filename is None: |
408 if len(args) != 2: | 408 if len(args) != 2: |
409 parser.print_help() | 409 parser.print_help() |
410 sys.exit(1) | 410 sys.exit(1) |
411 filename = args[1] | 411 filename = args[1] |
412 return self.Main(filename, options) | 412 return self.Main(filename, options) |
413 | 413 |
414 | 414 |
415 if __name__ == '__main__': | 415 if __name__ == '__main__': |
416 checker = PolicyTemplateChecker() | 416 sys.exit(PolicyTemplateChecker().Run(sys.argv)) |
417 sys.exit(checker.Run(sys.argv)) | |
OLD | NEW |