icinga2-diagnostics icon indicating copy to clipboard operation
icinga2-diagnostics copied to clipboard

Make OS detection work with Python 3

Open widhalmt opened this issue 6 years ago • 1 comments

The systemd compatible way of running hostnamectl and parsing the output works only with Python 2 so far.

widhalmt avatar Nov 07 '19 14:11 widhalmt

Hey there, I would not recommend using hostnamectl as it is not consistent on different systems. The better way would be to use the built in platform library of python. It should be working with python 2 up to 3.8 and on all known platforms where Python runs.

KevinHonka avatar Nov 07 '19 16:11 KevinHonka