Skip to content

Commit 6b79dab

Browse files
committed
strip repository string and add some debug prints
1 parent 40feb6d commit 6b79dab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/dorelease.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def post_request(url, timeout, data, headers=[], proxy=None):
152152
else:
153153
opener = build_opener(HTTPSHandler)
154154

155+
logger.debug("sending request to URL {}".format(url))
155156
request = Request(url, data=data)
156157
# XXX toxic
157158
# request.get_method = "POST"
@@ -169,7 +170,7 @@ def post_request(url, timeout, data, headers=[], proxy=None):
169170
except HTTPError as e:
170171
print e.code
171172
# XXX print string representatin of the code
172-
raise MyError("got HTTP error: %s" % e.code)
173+
raise MyError("got HTTP error: {} ({})".format(e.code, e.reason))
173174

174175
def upload_file(filepath, upload_url, headers, timeout, proxy=None):
175176
'''Upload file to given Github upload URL
@@ -212,7 +213,7 @@ def main():
212213
description = arguments.description[0]
213214
tag = arguments.tag[0].strip()
214215
logger.debug("using tag '{}'".format(tag))
215-
repo = arguments.repository[0]
216+
repo = arguments.repository[0].strip()
216217

217218
proxy = None
218219
if arguments.proxy:

0 commit comments

Comments
 (0)