mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
contrib/nmbug/nmbug-status: if realname empty, use part of mailaddr
When the From: field in patch email does not contain 'realname' field, the patch listing does not show anything as patch sender. In this case use the part before '@' in mail address as the sender identification in patch listing.
This commit is contained in:
parent
3ba01608d7
commit
6b47e2223d
1 changed files with 3 additions and 1 deletions
|
@ -90,7 +90,9 @@ def print_view(title, query, comment):
|
||||||
val = str.join(' ', val.split(None)[1:4])
|
val = str.join(' ', val.split(None)[1:4])
|
||||||
val = str(datetime.datetime.strptime(val, '%d %b %Y').date())
|
val = str(datetime.datetime.strptime(val, '%d %b %Y').date())
|
||||||
elif header == 'from':
|
elif header == 'from':
|
||||||
val = rfc822.parseaddr(val)[0]
|
(val, addr) = rfc822.parseaddr(val)
|
||||||
|
if val == '':
|
||||||
|
val = addr.split('@')[0]
|
||||||
|
|
||||||
if last[header] == val:
|
if last[header] == val:
|
||||||
out[header] = ''
|
out[header] = ''
|
||||||
|
|
Loading…
Reference in a new issue