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

Side by Side Diff: gn.py

Issue 955993006: Handle KeyboardInterrupt consistently in python scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: tweek test expectations Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 """This script is a wrapper around the GN binary that is pulled from Google 6 """This script is a wrapper around the GN binary that is pulled from Google
7 Cloud Storage when you sync Chrome. The binaries go into platform-specific 7 Cloud Storage when you sync Chrome. The binaries go into platform-specific
8 subdirectories in the source tree. 8 subdirectories in the source tree.
9 9
10 This script makes there be one place for forwarding to the correct platform's 10 This script makes there be one place for forwarding to the correct platform's
(...skipping 16 matching lines...) Expand all
27 return 1 27 return 1
28 gn_path = os.path.join(bin_path, 'gn' + gclient_utils.GetExeSuffix()) 28 gn_path = os.path.join(bin_path, 'gn' + gclient_utils.GetExeSuffix())
29 if not os.path.exists(gn_path): 29 if not os.path.exists(gn_path):
30 print >> sys.stderr, 'gn.py: Could not find gn executable at: %s' % gn_path 30 print >> sys.stderr, 'gn.py: Could not find gn executable at: %s' % gn_path
31 return 2 31 return 2
32 else: 32 else:
33 return subprocess.call([gn_path] + args[1:]) 33 return subprocess.call([gn_path] + args[1:])
34 34
35 35
36 if __name__ == '__main__': 36 if __name__ == '__main__':
37 sys.exit(main(sys.argv)) 37 try:
38 sys.exit(main(sys.argv))
39 except KeyboardInterrupt:
40 sys.stderr.write('interrupted\n')
41 sys.exit(1)
OLDNEW
« clang_format.py ('K') | « git_upstream_diff.py ('k') | my_activity.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698