* [PATCH] contrib/nmbug/nmbug-status: if realname empty, use part of mailaddr
@ 2012-08-24 17:29 Tomi Ollila
2012-09-02 2:32 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: Tomi Ollila @ 2012-08-24 17:29 UTC (permalink / raw)
To: notmuch; +Cc: Tomi Ollila
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.
---
contrib/nmbug/nmbug-status | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/contrib/nmbug/nmbug-status b/contrib/nmbug/nmbug-status
index f37ee84..9a334cc 100755
--- a/contrib/nmbug/nmbug-status
+++ b/contrib/nmbug/nmbug-status
@@ -90,7 +90,9 @@ def print_view(title, query, comment):
val = str.join(' ', val.split(None)[1:4])
val = str(datetime.datetime.strptime(val, '%d %b %Y').date())
elif header == 'from':
- val = rfc822.parseaddr(val)[0]
+ (val, addr) = rfc822.parseaddr(val)
+ if val == '':
+ val = addr.split('@')[0]
if last[header] == val:
out[header] = ''
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] contrib/nmbug/nmbug-status: if realname empty, use part of mailaddr
2012-08-24 17:29 [PATCH] contrib/nmbug/nmbug-status: if realname empty, use part of mailaddr Tomi Ollila
@ 2012-09-02 2:32 ` David Bremner
0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2012-09-02 2:32 UTC (permalink / raw)
To: Tomi Ollila, notmuch
Tomi Ollila <tomi.ollila@iki.fi> writes:
> 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.
pushed,
d
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-02 2:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-24 17:29 [PATCH] contrib/nmbug/nmbug-status: if realname empty, use part of mailaddr Tomi Ollila
2012-09-02 2:32 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).