Bruno Gomes <[EMAIL PROTECTED]> added the comment:

In this fix I removed the use of the file name in order to return the
distname. Now, only the file contents
is taken into account.

On Centos, the file name is the same as on Redhat, but its contents is
different:
$ cat /etc/redhat-release 
CentOS release 5 (Final)

Compare:

With test_platform_py26.diff:
Python 2.6a3+ (trunk:62996M, May 10 2008, 16:38:41) 
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.dist()
('redhat', '5', 'Final')
>>> 

With the new fix:
Python 2.6a3+ (trunk:62996M, May 10 2008, 16:38:41) 
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.dist()
('CentOS', '5', 'Final')
>>> 

I have tested this fix on Ubuntu, Centos5 and RHEL 5 and it works fine.
Ubuntu: ('Ubuntu', '8.04', 'hardy')
Fedora: ('fedora', '8', 'Werewolf')

----------
nosy: +bgomes
Added file: http://bugs.python.org/file10298/test_platform_py26_fix_centos.diff

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1322>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to