templater: retain author's full name if no email is supplied (issue1685)

This commit is contained in:
Marco Beck 2009-06-03 14:50:03 +02:00
parent 5912c48b40
commit 47e33d1f81

View File

@ -96,6 +96,7 @@ def domain(author):
def person(author): def person(author):
'''get name of author, or else username.''' '''get name of author, or else username.'''
if not '@' in author: return author
f = author.find('<') f = author.find('<')
if f == -1: return util.shortuser(author) if f == -1: return util.shortuser(author)
return author[:f].rstrip() return author[:f].rstrip()