Mercurial > public > mercurial-scm > hg
comparison hgext/phabricator.py @ 41901:a98dabdb5a7b
py3: convert URL to str before passing it to request
Differential Revision: https://phab.mercurial-scm.org/D6106
author | Ian Moody <moz-ian@perix.co.uk> |
---|---|
date | Sat, 09 Mar 2019 01:00:25 +0000 |
parents | 47125193bad0 |
children | 59bae59b7498 |
comparison
equal
deleted
inserted
replaced
41900:47125193bad0 | 41901:a98dabdb5a7b |
---|---|
216 sin.write(data) | 216 sin.write(data) |
217 sin.close() | 217 sin.close() |
218 body = sout.read() | 218 body = sout.read() |
219 else: | 219 else: |
220 urlopener = urlmod.opener(repo.ui, authinfo) | 220 urlopener = urlmod.opener(repo.ui, authinfo) |
221 request = util.urlreq.request(url, data=data) | 221 request = util.urlreq.request(pycompat.strurl(url), data=data) |
222 with contextlib.closing(urlopener.open(request)) as rsp: | 222 with contextlib.closing(urlopener.open(request)) as rsp: |
223 body = rsp.read() | 223 body = rsp.read() |
224 repo.ui.debug(b'Conduit Response: %s\n' % body) | 224 repo.ui.debug(b'Conduit Response: %s\n' % body) |
225 parsed = pycompat.rapply( | 225 parsed = pycompat.rapply( |
226 lambda x: encoding.unitolocal(x) if isinstance(x, pycompat.unicode) | 226 lambda x: encoding.unitolocal(x) if isinstance(x, pycompat.unicode) |