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 lemburg
Recipients benjamin.peterson, bgomes, christian.heimes, draghuram, georg.brandl, lemburg, pavel.vinogradov, sapetnioc, zooko
Date 2008-09-23.19:19:23
SpamBayes Score 3.52496e-14
Marked as misclassified No
Message-id <1222197579.47.0.876206826937.issue1322@psf.upfronthosting.co.za>
In-reply-to
Content
Zooko, I think the main reason for the parser in platform.py to fail on
Ubuntu is that Ubuntu doesn't ship with a /etc/ubuntu-release file and
instead uses the optional override parameters in /etc/lsb-release to
setup the distribution values.

E.g. on my Ubuntu box it has these lines:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"

I guess we'll need to add a special parser for lsb-release files which
then gets tried *after* having tried the /etc/<distro>-release files
(this is how the lsb_release command works as well) and overrides any
settings found in the <distro>-release file.

If that doesn't work either, the function will need to fallback to
_dist_try_harder().

There's no need to start a subprocess for running lsb_release. 

Please also note that the subprocess module is not available in Python
2.1, so it's not an option anyway (platform.py defines it's own popen()
helper which should be used instead).
History
Date User Action Args
2008-09-23 19:19:39lemburgsetrecipients: + lemburg, georg.brandl, zooko, draghuram, christian.heimes, sapetnioc, benjamin.peterson, pavel.vinogradov, bgomes
2008-09-23 19:19:39lemburgsetmessageid: <1222197579.47.0.876206826937.issue1322@psf.upfronthosting.co.za>
2008-09-23 19:19:23lemburglinkissue1322 messages
2008-09-23 19:19:23lemburgcreate