Commit e4d195ae authored by sergiyb@chromium.org's avatar sergiyb@chromium.org

Print response from the server on HTTP errors from Rietveld

This will make explanation provided by Rietveld visible to the user, e.g.
"Request to https://codereview.chromium.org/1386443003/edit_flags failed: Cannot
set commit on an issue that does not have a commit queue".

R=phajdan.jr@chromium.org
BUG=529339

Review URL: https://codereview.chromium.org/1387833002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297009 0039d316-1c4b-4281-b951-d872f2087c98
parent c15d2a0a
......@@ -449,6 +449,9 @@ class Rietveld(object):
raise
# If reaching this line, loop again. Uses a small backoff.
time.sleep(min(10, 1+retry*2))
except urllib2.HTTPError as e:
print 'Request to %s failed: %s' % (e.geturl(), e.read())
raise
finally:
upload.ErrorExit = old_error_exit
......
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