Skip to content

Commit 4fdeca4

Browse files
committed
fix HTTPError printing
1 parent 9cc530e commit 4fdeca4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/dorelease.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ def main():
258258
sys.exit(1)
259259
except HTTPError as e:
260260
if e.code != 404:
261-
print "Got HTTP error: " + str(e.value)
261+
print "Got HTTP error: {} ({})".format(e.code, str(e.reason))
262262
sys.exit(1)
263-
263+
264264
prerelease = False
265265
if arguments.prerelease:
266266
prerelease = True
@@ -300,7 +300,7 @@ def main():
300300
arguments.timeout, payload, headers, proxy)
301301
upload_url = release_json["upload_url"]
302302
except HTTPError as e:
303-
print 'HTTP exception occurred, value:', e.value
303+
print 'HTTP exception occurred, value:', e.reason
304304
sys.exit(1)
305305

306306
if upload_url:

0 commit comments

Comments
 (0)