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

Side by Side Diff: gcl.py

Issue 3493005: Shallow HTTPError exceptions so they aren't logged in breakpad. (Closed)
Patch Set: Only for http 500 Created 10 years, 3 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 (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 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 if not argv: 1301 if not argv:
1302 argv = ['help'] 1302 argv = ['help']
1303 command = Command(argv[0]) 1303 command = Command(argv[0])
1304 # Help can be run from anywhere. 1304 # Help can be run from anywhere.
1305 if command == CMDhelp: 1305 if command == CMDhelp:
1306 return command(argv[1:]) 1306 return command(argv[1:])
1307 1307
1308 try: 1308 try:
1309 GetRepositoryRoot() 1309 GetRepositoryRoot()
1310 except gclient_utils.Error: 1310 except gclient_utils.Error:
1311 print('To use gcl, you need to be in a subversion checkout.') 1311 print >> sys.stderr, 'To use gcl, you need to be in a subversion checkout.'
1312 return 1 1312 return 1
1313 1313
1314 # Create the directories where we store information about changelists if it 1314 # Create the directories where we store information about changelists if it
1315 # doesn't exist. 1315 # doesn't exist.
1316 try: 1316 try:
1317 if not os.path.exists(GetInfoDir()): 1317 if not os.path.exists(GetInfoDir()):
1318 os.mkdir(GetInfoDir()) 1318 os.mkdir(GetInfoDir())
1319 if not os.path.exists(GetChangesDir()): 1319 if not os.path.exists(GetChangesDir()):
1320 os.mkdir(GetChangesDir()) 1320 os.mkdir(GetChangesDir())
1321 if not os.path.exists(GetCacheDir()): 1321 if not os.path.exists(GetCacheDir()):
1322 os.mkdir(GetCacheDir()) 1322 os.mkdir(GetCacheDir())
1323 1323
1324 if command: 1324 if command:
1325 return command(argv[1:]) 1325 return command(argv[1:])
1326 # Unknown command, try to pass that to svn 1326 # Unknown command, try to pass that to svn
1327 return CMDpassthru(argv) 1327 return CMDpassthru(argv)
1328 except gclient_utils.Error, e: 1328 except gclient_utils.Error, e:
1329 print('Got an exception') 1329 print >> sys.stderr, 'Got an exception'
1330 print(str(e)) 1330 print >> sys.stderr, str(e)
1331 return 1
1332 except urllib2.HTTPError, e:
1333 if e.code != 500:
1334 raise
1335 print >> sys.stderr, (
1336 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
1337 'and retry or visit go/isgaeup.\n%s') % (e.code, e.reason)
1338 return 1
1339
1331 1340
1332 if __name__ == "__main__": 1341 if __name__ == "__main__":
1333 sys.exit(main(sys.argv[1:])) 1342 sys.exit(main(sys.argv[1:]))
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