OLD | NEW |
1 #!/usr/bin/env python | 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 """Creates a zip archive with policy template files. The list of input files is | 6 """Creates a zip archive with policy template files. The list of input files is |
7 extracted from a grd file with grit. This is to keep the length of input | 7 extracted from a grd file with grit. This is to keep the length of input |
8 arguments below the limit on Windows. | 8 arguments below the limit on Windows. |
9 """ | 9 """ |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 options.grd_input, options.grd_strip_path_prefix) | 74 options.grd_input, options.grd_strip_path_prefix) |
75 zip_file = zipfile.ZipFile(options.output, 'w', zipfile.ZIP_DEFLATED) | 75 zip_file = zipfile.ZipFile(options.output, 'w', zipfile.ZIP_DEFLATED) |
76 try: | 76 try: |
77 return add_files_to_zip(zip_file, options.basedir, file_list) | 77 return add_files_to_zip(zip_file, options.basedir, file_list) |
78 finally: | 78 finally: |
79 zip_file.close() | 79 zip_file.close() |
80 | 80 |
81 | 81 |
82 if '__main__' == __name__: | 82 if '__main__' == __name__: |
83 sys.exit(main(sys.argv)) | 83 sys.exit(main(sys.argv)) |
OLD | NEW |