Commit 9ce0dff6 authored by maruel@chromium.org's avatar maruel@chromium.org

upload.py has a raw_input() that keeps on throwing crap, try to trap it as much as possible.

Otherwise I get useless stack traces and the user too.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6794020

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80338 0039d316-1c4b-4281-b951-d872f2087c98
parent a2d7edf8
......@@ -906,7 +906,10 @@ def CMDupload(change_info, args):
# each file and concatenate them before passing it to upload.py.
if change_info.patch is None:
change_info.patch = GenerateDiff(change_info.GetFileNames())
issue, patchset = upload.RealMain(upload_arg, change_info.patch)
try:
issue, patchset = upload.RealMain(upload_arg, change_info.patch)
except KeyboardInterrupt:
sys.exit(1)
if issue and patchset:
change_info.issue = int(issue)
change_info.patchset = int(patchset)
......
......@@ -984,6 +984,8 @@ def CMDupload(parser, args):
try:
issue, patchset = upload.RealMain(['upload'] + upload_args + args)
except KeyboardInterrupt:
sys.exit(1)
except:
# If we got an exception after the user typed a description for their
# change, back up the description before re-raising.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment