[issue9514] platform.linux_distribution() under Ubuntu returns ('debian', 'squeeze/sid', '')
Antoine Pitrou
report at bugs.python.org
Wed Aug 4 20:13:02 CEST 2010
Antoine Pitrou <pitrou at free.fr> added the comment:
FWIW, the output is a bit different here before the patch:
$ ./python -c "import platform; print(platform.linux_distribution())"
('Mandriva Linux', '2010.1', 'Official')
and after the patch:
$ ./python -c "import platform; print(platform.linux_distribution())"
('MandrivaLinux', '2010.1', 'Henry_Farman')
but I would say it's because Mandriva has inconsistent contents in their respective /etc/mandriva_release and /etc/lsb-release files.
The patch itself is a bit imperfect and will need reworking (_u_distname, _u_version and _u_id should be initialized to '' rather than catching UnboundLocalError; remove ubuntu-specific comments).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9514>
_______________________________________
More information about the Python-bugs-list
mailing list