diff options
author | Jeremy Kolb <jkolb@brandeis.edu> | 2005-05-18 00:57:14 +0000 |
---|---|---|
committer | Jeremy Kolb <jkolb@brandeis.edu> | 2005-05-18 00:57:14 +0000 |
commit | f409e9216a6a217f2d51dbf9c486f80491ff68a8 (patch) | |
tree | 13cc1309e15df33c899910dd86fc346745b27b06 /CVSROOT | |
parent | f8a659b8b1c752d923e015e4ba506fc64159c4c8 (diff) |
Fix name bug with gecos having "Name,,,,".
Diffstat (limited to 'CVSROOT')
-rwxr-xr-x | CVSROOT/syncmail | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CVSROOT/syncmail b/CVSROOT/syncmail index 465f2e6..798d966 100755 --- a/CVSROOT/syncmail +++ b/CVSROOT/syncmail @@ -223,13 +223,13 @@ def blast_mail(subject, people, entries, contextlines, fromhost, replyto): conn.connect(MAILHOST, MAILPORT) pwinfo = pwd.getpwuid(os.getuid()) user = pwinfo[0] - name = pwinfo[4] + name = pwinfo[4].split(",")[0] domain = fromhost or socket.getfqdn() address = '%s@%s' % (user, domain) s = StringIO() datestamp = time.strftime('%a, %d %b %Y %H:%M:%S +0000', time.gmtime(time.time())) - vars = {'author' : formataddr((user, address)), + vars = {'author' : formataddr((name, address)), 'people' : COMMASPACE.join(people), 'subject' : subject, 'version' : __version__, |