]> git.ipfire.org Git - oddments/fireinfo.git/commitdiff
system: Ignore when the serial number is "SSN"
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 8 Jul 2022 08:31:25 +0000 (08:31 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 8 Jul 2022 11:06:38 +0000 (11:06 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/fireinfo/system.py

index c9c81b1ced8d7bac09b96d9d26aa9e44f8d1ee23..9edc3452b16ecfa2b40a45cb567bcc68cf95dab2 100644 (file)
@@ -44,7 +44,7 @@ INVALID_ID_STRINGS = (
        "EVAL",
        "Not Applicable",
        "None", "empty",
-       "Serial", "System Serial Number",
+       "Serial", "System Serial Number", "SSN",
        "XXXXX",
        "01010101-0101-0101-0101-010101010101",
        "00020003-0004-0005-0006-000700080009",
@@ -272,7 +272,9 @@ class System(object, metaclass=Singleton):
                if not ids:
                        root_disk_serial = self.root_disk_serial
                        if root_disk_serial and not root_disk_serial.startswith("QM000"):
-                               ids.append(root_disk_serial)
+                               # Skip any invalid IDs
+                               if not root_disk_serial in INVALID_ID_STRINGS:
+                                       ids.append(root_disk_serial)
 
                # As last resort, we use the UUID from pakfire.
                if not ids: