strip null byte from the string before storing

This commit is contained in:
Daniel Markstedt
2025-11-24 22:36:03 +01:00
parent a0996c9a8a
commit b49ffeca53
+1 -1
View File
@@ -40,7 +40,7 @@ class SysCmds:
if Path(PROC_MODEL_PATH).is_file():
try:
with open(PROC_MODEL_PATH, "r") as open_file:
hardware = open_file.read().rstrip()
hardware = open_file.read().rstrip("\x00")
except (IOError, ValueError, EOFError, TypeError) as error:
logging.error(str(error))
# As a fallback, look for PC vendor information