New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
platform.linux_distribution() returns empty value on Archlinux and python 2.7 #64653
Comments
On Archlinux: $ python2.7 -c 'import platform; print(platform.linux_distribution())'
('', '', '') This is because Archlinux is not part of the '_supported_dists' list. Could Archlinux be added to this list ? Thanks. |
Can Archlinux be added to _supported_dists as requested in msg209764, I've no understanding of the criteria involved here? |
Hey guys, Just add: if os.path.exists('/etc/arch-release'):
distname = 'arch' in "_dist_try_harder" then replace the old list with this one: _supported_dists = (
'SuSE', 'debian', 'fedora', 'redhat', 'centos',
'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
'UnitedLinux', 'turbolinux', 'arch') And that's it, it works. |
Since the direction we are heading seems to toward deprecating linux_distribution (see http://bugs.python.org/issue1322#msg207427), I think this issue should be closed. |
The problem is, existing software (Ansible) relies on linux_distribution() |
linux_distribution is removed in Python 3.7. |
Er, sorry, I meant in 3.8. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: