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

Side by Side Diff: native_client_sdk/src/build_tools/sdk_tools/sdk_update.py

Issue 16022005: [NaCl SDK] Add keyboard interrupt handlers for python scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Shim script for the SDK updater, to allow automatic updating. 6 """Shim script for the SDK updater, to allow automatic updating.
7 7
8 The purpose of this script is to be a shim which automatically updates 8 The purpose of this script is to be a shim which automatically updates
9 sdk_tools (the bundle containing the updater scripts) whenever this script is 9 sdk_tools (the bundle containing the updater scripts) whenever this script is
10 run. 10 run.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 args = sys.argv[1:] 105 args = sys.argv[1:]
106 if UpdateSDKTools(args) and RenameSdkToolsDirectory(): 106 if UpdateSDKTools(args) and RenameSdkToolsDirectory():
107 # Call the shell script, just in case this script was updated in the next 107 # Call the shell script, just in case this script was updated in the next
108 # version of sdk_tools 108 # version of sdk_tools
109 return subprocess.call([NACLSDK_SHELL_SCRIPT] + args) 109 return subprocess.call([NACLSDK_SHELL_SCRIPT] + args)
110 else: 110 else:
111 return subprocess.call(MakeSdkUpdateMainCmd(args)) 111 return subprocess.call(MakeSdkUpdateMainCmd(args))
112 112
113 113
114 if __name__ == '__main__': 114 if __name__ == '__main__':
115 sys.exit(main()) 115 try:
116 sys.exit(main())
117 except KeyboardInterrupt:
118 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698