Mercurial > hg
changeset 43047:0f90c2d2d7e8
py3: fix phabricator's use of json.loads() for py3.5
Missed this in c340a8ac7ef3 since `loads()` takes bytes from 3.6 onwards.
Differential Revision: https://phab.mercurial-scm.org/D6961
author | Ian Moody <moz-ian@perix.co.uk> |
---|---|
date | Fri, 04 Oct 2019 18:33:54 +0100 |
parents | e360acfaf210 |
children | c348d829d23a |
files | hgext/phabricator.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/phabricator.py Fri Oct 04 18:18:38 2019 +0100 +++ b/hgext/phabricator.py Fri Oct 04 18:33:54 2019 +0100 @@ -251,7 +251,8 @@ parsed = pycompat.rapply( lambda x: encoding.unitolocal(x) if isinstance(x, pycompat.unicode) else x, - json.loads(body) + # json.loads only accepts bytes from py3.6+ + json.loads(encoding.unifromlocal(body)) ) if parsed.get(b'error_code'): msg = (_(b'Conduit Error (%s): %s')