explicitly encode for unicode in a bzauth exception

This commit is contained in:
Andrew McCreight 2017-02-02 09:41:56 -08:00
Родитель d4f9c61dc7
Коммит ce418c6b48
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -18,3 +18,5 @@ The repository is located at https://hg.mozilla.org/hgcustom/version-control-too
- auth.py is copied from pylib/mozhg/mozhg/
- bz.py and bzauth.py are copied from hgext/bzexport/
- bzexport.py is a few pieces of code copied from hgext/bzexport/__init__.py
In addition, a patch to bzauth.py for bug 1336147 was manually applied.

Просмотреть файл

@ -145,7 +145,7 @@ class bzAuth:
j = res.json()
if 'error' in j:
raise Exception('REST error on %s to %s: %s' % (
method, url, j['message']))
method, url, unicode(j['message']).encode("utf-8")))
return j