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
--- 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')