Katello / katello-client-bootstrap

Bootstrap Script for migrating systems to Foreman & Katello
GNU General Public License v2.0
52 stars 63 forks source link

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

Open diastelo opened 2 years ago

diastelo commented 2 years ago

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 commented 1 year ago

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