mirror of
https://github.com/akuker/RASCSI.git
synced 2026-04-26 21:18:56 +00:00
strip null byte from the string before storing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user