mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 10:01:53 +08:00
fix
This commit is contained in:
@@ -112,7 +112,7 @@ class HwInfoSubmanager(BaseInfoSubmanager):
|
||||
if name not in self.__dt_cache:
|
||||
path = os.path.join(f"{env.PROCFS_PREFIX}/proc/device-tree", name)
|
||||
if not os.path.exists(path):
|
||||
path = os.path.join(f"{env.PROCFS_PREFIX}/usr/share/kvmd/extras/hw_info/", name)
|
||||
path = os.path.join(f"{env.PROCFS_PREFIX}/etc/kvmd/hw_info/", name)
|
||||
try:
|
||||
self.__dt_cache[name] = (await aiotools.read_file(path)).strip(" \t\r\n\0")
|
||||
except Exception as err:
|
||||
@@ -143,7 +143,7 @@ class HwInfoSubmanager(BaseInfoSubmanager):
|
||||
try:
|
||||
return int((await aiotools.read_file(temp_path)).strip()) / 1000
|
||||
except Exception as err:
|
||||
get_logger(0).warn("Can't read CPU temp from %s: %s", temp_path, err)
|
||||
#get_logger(0).warn("Can't read CPU temp from %s: %s", temp_path, err)
|
||||
return None
|
||||
|
||||
async def __get_cpu_percent(self) -> (float | None):
|
||||
|
||||
Reference in New Issue
Block a user