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
changes/01/332501/1
sergiyb@chromium.org 10 years ago
parent c15d2a0aa7
commit e4d195aed9

@ -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

Loading…
Cancel
Save