machine: add distribution to system info
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
1 parent
5e87d8793d
commit
24eaff6951
2 files changed
+6
-1
No files matched your search
@@ -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:"
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user