machine: add distribution to system info

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-04-26 09:09:17 -04:00
parent 5e87d8793d
commit 24eaff6951
2 changed files with 6 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import re
import pathlib
import logging
import platform
import distro
from tornado.ioloop import IOLoop
ALLOWED_SERVICES = ["moonraker", "klipper", "webcamd"]
@ -21,9 +22,12 @@ SD_MFGRS = {
class Machine:
def __init__(self, config):
self.server = config.get_server()
dist_info = {'name': distro.name(pretty=True)}
dist_info.update(distro.info())
self.system_info = {
'cpu_info': self._get_cpu_info(),
'sd_info': self._get_sdcard_info()
'sd_info': self._get_sdcard_info(),
'distribution': dist_info
}
# Add system info to log rollover
sys_info_msg = "\nSystem Info:"

View File

@ -4,3 +4,4 @@ pyserial==3.4
pillow==8.1.2
lmdb==1.2.1
streaming-form-data==1.8.1
distro==1.5.0