Message73659
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. |
|
Date |
User |
Action |
Args |
2008-09-23 19:38:20 | zooko | set | recipients:
+ zooko, lemburg, georg.brandl, draghuram, christian.heimes, sapetnioc, benjamin.peterson, pavel.vinogradov, bgomes |
2008-09-23 19:38:20 | zooko | set | messageid: <1222198700.72.0.995245083788.issue1322@psf.upfronthosting.co.za> |
2008-09-23 19:38:20 | zooko | link | issue1322 messages |
2008-09-23 19:38:19 | zooko | create | |
|