Commit 4e789a44 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

format: add more information in os_type

From python3.8, platform.platform() changed the output:

$ python3.7 -c 'import platform ; print(platform.platform())'
Linux-5.10.0-16-amd64-x86_64-with-debian-11.4

$ python3.8 -c 'import platform ; print(platform.platform())'
Linux-5.10.0-16-amd64-x86_64-with-glibc2.2.5
parent 42411184
Pipeline #22842 passed with stage
in 0 seconds
......@@ -29,6 +29,7 @@
##############################################################################
from six.moves import configparser
import distro
import errno
import fcntl
import grp
......@@ -326,7 +327,7 @@ class Computer(object):
self.public_ipv4_address = getPublicIPv4Address()
self.slapos_version = version.version
self.python_version = platform.python_version()
self.os_type = platform.platform()
self.os_type = json.dumps((platform.platform(),distro.id(),distro.version(),distro.name()))
def send(self, conf):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment