|
Handle KeyboardInterrupt consistently in python scripts
Handle KeyboardInterrupt gracefully rather the printing a
backtrace. Most users of these tools don't expect a
backtrace when then hit Ctrl-C.
Also, fix a few other inconsistencies found in the python
startup code of these different scripts:
- always call main function 'main' (rather than 'Main')
- always return 0 from main function
- if main takes args never include argv[0]
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=294250
Total comments: 4
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+216 lines, -70 lines) |
Patch |
 |
M |
apply_issue.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome-update.py
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
clang_format.py
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -2 lines |
2 comments
|
Download
|
 |
M |
commit_queue.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
drover.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
fetch.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
gcl.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
gclient.py
|
View
|
1
2
3
4
|
2 chunks |
+7 lines, -2 lines |
0 comments
|
Download
|
 |
M |
git_auto_svn.py
|
View
|
1
2
3
4
|
2 chunks |
+7 lines, -2 lines |
0 comments
|
Download
|
 |
M |
git_cache.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
git_cherry_pick_upload.py
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
git_cl.py
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
git_footers.py
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
git_freezer.py
|
View
|
1
2
3
4
|
1 chunk |
+8 lines, -3 lines |
0 comments
|
Download
|
 |
M |
git_map.py
|
View
|
1
2
3
4
|
2 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
git_map_branches.py
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -2 lines |
0 comments
|
Download
|
 |
M |
git_mark_merge_base.py
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
git_nav_downstream.py
|
View
|
1
2
3
4
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
git_new_branch.py
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
git_number.py
|
View
|
1
2
3
4
|
1 chunk |
+17 lines, -16 lines |
0 comments
|
Download
|
 |
M |
git_rebase_update.py
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
git_rename_branch.py
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
git_reparent_branch.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
git_retry.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
git_squash_branch.py
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
git_try.py
|
View
|
1
2
3
4
|
2 chunks |
+10 lines, -2 lines |
0 comments
|
Download
|
 |
M |
git_upstream_diff.py
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
gn.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
my_activity.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
my_reviews.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
presubmit_support.py
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
pylint.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
roll_dep.py
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
tests/presubmit_unittest.py
|
View
|
1
2
3
4
5
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
upload_to_google_storage.py
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
Total messages: 14 (4 generated)
|