[Xcb-commit] CVSROOT syncmail,1.5,1.6

Jeremy Kolb jkolb at gabe.freedesktop.org
Tue May 17 17:57:16 PDT 2005


Update of /cvs/xcb/CVSROOT
In directory gabe:/tmp/cvs-serv1077

Modified Files:
	syncmail 
Log Message:
Fix name bug with gecos having "Name,,,,".


Index: syncmail
===================================================================
RCS file: /cvs/xcb/CVSROOT/syncmail,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- syncmail	18 May 2005 00:28:33 -0000	1.5
+++ syncmail	18 May 2005 00:57:14 -0000	1.6
@@ -223,13 +223,13 @@
         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__,



More information about the xcb-commit mailing list