CVS: tmda/TMDA Util.py,1.105,1.106
"Jason R. Mastaler" <[email protected]>
| Newsgroups | gmane.mail.spam.tmda.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tmda/tmda/TMDA
In directory sc8-pr-cvs1:/tmp/cvs-serv11935/TMDA
Modified Files:
Util.py
Log Message:
Bugfix. Under Linux and some other OSs, the "comment" field from the
passwd file can optionally contain three fields separated by a comma.
We now remove everything to the left of the first comma so that
"FULLNAME" will not include these commas.
Index: Util.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Util.py,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- Util.py 22 Sep 2003 23:15:49 -0000 1.105
+++ Util.py 23 Sep 2003 00:22:49 -0000 1.106
@@ -68,6 +68,8 @@
os.environ.get('MAILNAME')
if not fullname:
fullname = pwd.getpwuid(os.getuid())[4]
+ if fullname:
+ fullname = fullname.split(',')[0]
if not fullname:
fullname = 'Jane Doe'
return fullname
_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs