]> git.ipfire.org Git - oddments/fireinfo.git/commitdiff
Fix adding of hdd string only if no other was found.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 12 Dec 2010 22:22:03 +0000 (23:22 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 12 Dec 2010 22:22:03 +0000 (23:22 +0100)
fireinfo/system.py

index ce0efc71ccf9de95ddf05fd80b6761a91c295216..7858600bd0ac10b9664258fa05f072951ec7f919 100644 (file)
@@ -209,10 +209,12 @@ class System(object):
 
                ids = _ids
 
-               # Use serial number from root disk (if available)
-               root_disk_serial = self.root_disk_serial
-               if root_disk_serial:
-                       ids.append(root_disk_serial)
+               # Use serial number from root disk (if available) and if
+               # no other ID was found, yet.
+               if not ids:
+                       root_disk_serial = self.root_disk_serial
+                       if root_disk_serial:
+                               ids.append(root_disk_serial)
 
                # As last resort, we use the UUID from pakfire.
                if not ids: