Mercurial > hg
changeset 36308:548316560a05
py3: use bytes() to byte-stringify url object in url.py
Perhaps we'll have to convert it back and forth from/to bytes and unicode
at urllib boundary, but at least util.hidepassword() wants a byte string.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 18 Feb 2018 22:13:25 +0900 |
parents | 37a1501cbcfd |
children | 94a1ff16f362 |
files | mercurial/url.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/url.py Sun Feb 18 22:12:11 2018 +0900 +++ b/mercurial/url.py Sun Feb 18 22:13:25 2018 +0900 @@ -71,10 +71,10 @@ u.query = None if not self.ui.interactive(): raise error.Abort(_('http authorization required for %s') % - util.hidepassword(str(u))) + util.hidepassword(bytes(u))) self.ui.write(_("http authorization required for %s\n") % - util.hidepassword(str(u))) + util.hidepassword(bytes(u))) self.ui.write(_("realm: %s\n") % realm) if user: self.ui.write(_("user: %s\n") % user) @@ -124,7 +124,7 @@ else: self.no_list = no_list - proxyurl = str(proxy) + proxyurl = bytes(proxy) proxies = {'http': proxyurl, 'https': proxyurl} ui.debug('proxying through %s\n' % util.hidepassword(proxyurl)) else: