Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-09-23 22:19, Zooko O'Whielacronx wrote: > Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: > >> Because that's exactly what lsb_release does as well.
I have to correct that: lsb_release will only look at the other release files in case it doesn't already enough information from the lsb-release file. > You must know something about common lsb_release implementations that I > don't. As far as I saw in the LSB documentation, it is required to > print out information in a certain format, but how it is implemented is > totally up to the distribution in question. Just do a "man lsb_release" or look at the lsb_release shell script. > You give examples of SuSE and Fedora as not having /etc/lsb-release > files, Fedora doesn't have that file, so lsb_release has to read the results from /etc/fedora-release. SuSE does, but doesn't override the default set in /etc/SuSE-release. > and I'm sure you are right, but I happen to know that both of > them have compliant lsb_release executables (and that they have had for > many releases). So, the patch that I've submitted will definitely work > correctly for those two distributions, although it will pay the price of > having to spawn a subprocess and then wait for the lsb_release > executable to do its work (however it does it). > > However, presumably your SuSE- and Fedora- specific techniques will give > correct answers on those platforms faster than the generic lsb_release > would. Yep and the same is true for all other _supported_dists. I always try to avoid spawning external processes whenever I can. _______________________________________ Python 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