Changes.get_latest_author_by_email() was broken under Python 3.
This is because of the patch committed with revision 68a6e90228
. As
Python 3 stores unicode strings by default, we need to convert them back.
This change will hopefully fix it once and for all.
This commit is contained in:
parent
eed6d0debf
commit
1230fcf80c
|
@ -21,6 +21,7 @@ from __future__ import print_function
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from localization import N_
|
from localization import N_
|
||||||
from outputable import Outputable
|
from outputable import Outputable
|
||||||
|
import codecs
|
||||||
import datetime
|
import datetime
|
||||||
import extensions
|
import extensions
|
||||||
import filtering
|
import filtering
|
||||||
|
@ -179,6 +180,9 @@ class Changes:
|
||||||
return self.authors_dateinfo
|
return self.authors_dateinfo
|
||||||
|
|
||||||
def get_latest_author_by_email(self, name):
|
def get_latest_author_by_email(self, name):
|
||||||
|
if not hasattr(name, 'decode'):
|
||||||
|
name = str.encode(name)
|
||||||
|
|
||||||
name = name.decode("unicode_escape", "ignore")
|
name = name.decode("unicode_escape", "ignore")
|
||||||
return self.authors_by_email[name]
|
return self.authors_by_email[name]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue