Skip to content
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

OS Detection with platform module doesn't support Python 3.9 #366

Open
diastelo opened this issue May 27, 2022 · 1 comment
Open

OS Detection with platform module doesn't support Python 3.9 #366

diastelo opened this issue May 27, 2022 · 1 comment

Comments

@diastelo
Copy link

Some of the functions used in the OS version detection section of bootstrap.py have been deprecated and removed. I got an error on RHEL 9 that platform.dist and platform.linux_distribution() don't exist. There was a recommendation to switch to the distro module in an issue tracker for the platform module, but this doesn't ship with platform-python.

@stanlog
Copy link

stanlog commented Sep 19, 2022

I've got the same issue :
`Foreman Bootstrap Script
This script is designed to register new systems or to migrate an existing system to a Foreman server with Katello
Traceback (most recent call last):
File "/root/bootstrap.py", line 1142, in
RELEASE = platform.linux_distribution()[1]
AttributeError: module 'platform' has no attribute 'linux_distribution'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/bootstrap.py", line 1145, in
RELEASE = platform.dist()[1]
AttributeError: module 'platform' has no attribute 'dist'`

RHEL 9 / Python 3.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants