This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bgomes
Recipients bgomes, christian.heimes, draghuram, georg.brandl, pavel.vinogradov, sapetnioc
Date 2008-05-12.02:28:58
SpamBayes Score 0.047595
Marked as misclassified No
Message-id <1210559343.79.0.609475905031.issue1322@psf.upfronthosting.co.za>
In-reply-to
Content
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')
History
Date User Action Args
2008-05-12 02:29:04bgomessetspambayes_score: 0.047595 -> 0.047595
recipients: + bgomes, georg.brandl, draghuram, christian.heimes, sapetnioc, pavel.vinogradov
2008-05-12 02:29:03bgomessetspambayes_score: 0.047595 -> 0.047595
messageid: <1210559343.79.0.609475905031.issue1322@psf.upfronthosting.co.za>
2008-05-12 02:29:02bgomeslinkissue1322 messages
2008-05-12 02:29:02bgomescreate