katello-client-bootstrap icon indicating copy to clipboard operation
katello-client-bootstrap copied to clipboard

OS Detection with platform module doesn't support Python 3.9

Open diastelo opened this issue 3 years ago • 1 comments

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.

diastelo avatar May 27 '22 19:05 diastelo

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

stanlog avatar Sep 19 '22 09:09 stanlog