[issue1322] platform.dist() has unpredictable result under Linux

Christian Heimes report at bugs.python.org
Fri Oct 26 13:45:57 CEST 2007


Christian Heimes added the comment:

> I am writing a patch but I have a few questions:
> 
> 1) There are at most three places where the distribution name can be
> found. What is the priority order to select only one name ?
> The three places are:
>   a) Inside the /etc/lsb-release file
>   b) In the name of the /etc/<distrib>-release file
>   c) In the content of the /etc/<distrib>-release file

As far as I remember the specs a /etc/*-release file has a higher
priority than /etc/lsb-release.

> 2) Can I remove supported_dists parameter of platform.dist ?
> There could be a list of supported distributions but why
> as a parameter of this function ?

I agree. A module global list is better than a list as a function argument.

Can you also use a global variable instead of "/etc"? Something like
ETC_DIR = "/etc" for example. It would allow you to ship samples from
several distribution and run unit tests against each.

Christian

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1322>
__________________________________


More information about the Python-bugs-list mailing list