# HG changeset patch # User Mads Kiilerich # Date 2016-01-05 16:30:12 # Node ID 13da890538532ecc99a5be124dc2f465196e4bf6 # Parent 6de3e89075549b44993eda694f56cb7343007851 vcs: emails are never unicode so make author_email return strings diff --git a/kallithea/lib/vcs/utils/__init__.py b/kallithea/lib/vcs/utils/__init__.py --- a/kallithea/lib/vcs/utils/__init__.py +++ b/kallithea/lib/vcs/utils/__init__.py @@ -171,9 +171,9 @@ def author_email(author): r"""0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]""" r"""*[a-z0-9])?""", re.IGNORECASE) m = re.findall(email_re, author) - return m[0] if m else '' + return safe_str(m[0]) if m else '' - return author[l + 1:r].strip() + return safe_str(author[l + 1:r].strip()) def author_name(author):