OLD | NEW |
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 Loading... |
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) |
OLD | NEW |