OLD | NEW |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2009 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 Wrapper script around Rietveld's upload.py that simplifies working with groups | 7 Wrapper script around Rietveld's upload.py that simplifies working with groups |
8 of files. | 8 of files. |
9 """ | 9 """ |
10 | 10 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 for line in settings_file.splitlines(): | 196 for line in settings_file.splitlines(): |
197 if not line or line.startswith('#'): | 197 if not line or line.startswith('#'): |
198 continue | 198 continue |
199 if not ':' in line: | 199 if not ':' in line: |
200 raise gclient_utils.Error( | 200 raise gclient_utils.Error( |
201 '%s is invalid, please fix. It\'s content:\n\n%s' % | 201 '%s is invalid, please fix. It\'s content:\n\n%s' % |
202 (CODEREVIEW_SETTINGS_FILE, settings_file)) | 202 (CODEREVIEW_SETTINGS_FILE, settings_file)) |
203 k, v = line.split(':', 1) | 203 k, v = line.split(':', 1) |
204 CODEREVIEW_SETTINGS[k.strip()] = v.strip() | 204 CODEREVIEW_SETTINGS[k.strip()] = v.strip() |
205 CODEREVIEW_SETTINGS.setdefault('__just_initialized', None) | 205 CODEREVIEW_SETTINGS.setdefault('__just_initialized', None) |
206 return CODEREVIEW_SETTINGS.get(key, "") | 206 return CODEREVIEW_SETTINGS.get(key, '') |
M-A Ruel
2010/10/07 13:48:56
This doesn't change anything so remove it from thi
| |
207 | 207 |
208 | 208 |
209 def Warn(msg): | 209 def Warn(msg): |
210 print >> sys.stderr, msg | 210 print >> sys.stderr, msg |
211 | 211 |
212 | 212 |
213 def ErrorExit(msg): | 213 def ErrorExit(msg): |
214 print >> sys.stderr, msg | 214 print >> sys.stderr, msg |
215 sys.exit(1) | 215 sys.exit(1) |
216 | 216 |
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1336 if e.code != 500: | 1336 if e.code != 500: |
1337 raise | 1337 raise |
1338 print >> sys.stderr, ( | 1338 print >> sys.stderr, ( |
1339 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1339 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1340 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1340 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
1341 return 1 | 1341 return 1 |
1342 | 1342 |
1343 | 1343 |
1344 if __name__ == "__main__": | 1344 if __name__ == "__main__": |
1345 sys.exit(main(sys.argv[1:])) | 1345 sys.exit(main(sys.argv[1:])) |
OLD | NEW |