From 1b1aea7917b9c7bc969f4d1d4c4ea0a35c0c5a10 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 29 Jun 2023 03:57:24 +0100 Subject: [PATCH] fix serial check for rockpi --- hw_diag/utilities/hardware.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw_diag/utilities/hardware.py b/hw_diag/utilities/hardware.py index 7ee2029a..bb696251 100644 --- a/hw_diag/utilities/hardware.py +++ b/hw_diag/utilities/hardware.py @@ -255,10 +255,12 @@ def get_serial_number(diagnostics): cpuinfo = load_cpu_info() serial = load_serial_number() serial_number = "" - if has_valid_serial(serial): + if has_valid_serial(serial) and not is_rockpi(): serial_number = serial[CPUINFO_SERIAL_KEY] elif has_valid_serial(cpuinfo): serial_number = cpuinfo[CPUINFO_SERIAL_KEY] + elif has_valid_serial(serial) and is_rockpi(): + serial_number = serial[CPUINFO_SERIAL_KEY] else: serial_number = "Serial number not found" except FileNotFoundError as e: