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 zooko
Recipients benjamin.peterson, bgomes, christian.heimes, draghuram, georg.brandl, lemburg, pavel.vinogradov, sapetnioc, zooko
Date 2008-09-23.19:38:19
SpamBayes Score 8.60629e-09
Marked as misclassified No
Message-id <1222198700.72.0.995245083788.issue1322@psf.upfronthosting.co.za>
In-reply-to
Content
Okay, per MAL's request over on #3937, I tried
platform.get_linux_distribution() on the current svn trunk (which I
assume is the version that is about to become python 2.6).  It gave the
same not-so-great answer as platform.dist() used to: ('debian',
'lenny/sid', '').  I then ported my patch to trunk (attached), and it
gave the answer I wanted: ('Ubuntu', '8.04', 'hardy').

Note that technique of parsing /etc/lsb-release or invoking lsb_release
is more standard and generic and easier to maintain than the current
technique of trying a series of specific file parses for specific
"supported" distributions.  For example, if some new Linux distribution
is invented, or if this is tried on a distribution that isn't in the
supported list (has anyone tried this on Foresight Linux yet?), then my
technique has a good chance of working on that distribution, where the
current technique has a higher chance of accidentally mis-identifying it
as some other distribution, for example the way that the current trunk
mis-identifies Ubuntu 8.04 as Debian lenny/sid.
History
Date User Action Args
2008-09-23 19:38:20zookosetrecipients: + zooko, lemburg, georg.brandl, draghuram, christian.heimes, sapetnioc, benjamin.peterson, pavel.vinogradov, bgomes
2008-09-23 19:38:20zookosetmessageid: <1222198700.72.0.995245083788.issue1322@psf.upfronthosting.co.za>
2008-09-23 19:38:20zookolinkissue1322 messages
2008-09-23 19:38:19zookocreate