Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: components/cronet/tools/cronet_licenses.py

Issue 2254273004: Delete stray debugging print in Cronet build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 """Generates the contents of an Cronet LICENSE file for the third-party code. 6 """Generates the contents of an Cronet LICENSE file for the third-party code.
7 7
8 It makes use of src/tools/licenses.py and the README.chromium files on which 8 It makes use of src/tools/licenses.py and the README.chromium files on which
9 it depends. Based on android_webview/tools/webview_licenses.py. 9 it depends. Based on android_webview/tools/webview_licenses.py.
10 """ 10 """
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 usage='%prog command [options]') 97 usage='%prog command [options]')
98 parser.add_option('--gn', help='Use gn deps to find third party dependencies', 98 parser.add_option('--gn', help='Use gn deps to find third party dependencies',
99 action='store_true') 99 action='store_true')
100 parser.add_option('--gn-path', default='gn', 100 parser.add_option('--gn-path', default='gn',
101 help='Path to gn executable (default: %(default)s)') 101 help='Path to gn executable (default: %(default)s)')
102 parser.description = (__doc__ + 102 parser.description = (__doc__ +
103 '\nCommands:\n' \ 103 '\nCommands:\n' \
104 ' license [filename]\n' \ 104 ' license [filename]\n' \
105 ' Generate Cronet LICENSE to filename or stdout.\n') 105 ' Generate Cronet LICENSE to filename or stdout.\n')
106 (flags, args) = parser.parse_args() 106 (flags, args) = parser.parse_args()
107 print flags
108 107
109 if flags.gn: 108 if flags.gn:
110 global third_party_dirs 109 global third_party_dirs
111 third_party_dirs = FindThirdPartyDeps(flags.gn_path, os.getcwd()) 110 third_party_dirs = FindThirdPartyDeps(flags.gn_path, os.getcwd())
112 111
113 if not args: 112 if not args:
114 parser.print_help() 113 parser.print_help()
115 return 1 114 return 1
116 115
117 if args[0] == 'license': 116 if args[0] == 'license':
118 if len(args) > 1: 117 if len(args) > 1:
119 f = open(args[1], "w") 118 f = open(args[1], "w")
120 try: 119 try:
121 f.write(GenerateLicense()) 120 f.write(GenerateLicense())
122 finally: 121 finally:
123 f.close() 122 f.close()
124 else: 123 else:
125 print GenerateLicense() 124 print GenerateLicense()
126 return 0 125 return 0
127 126
128 parser.print_help() 127 parser.print_help()
129 return 1 128 return 1
130 129
131 130
132 if __name__ == '__main__': 131 if __name__ == '__main__':
133 sys.exit(main()) 132 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698