From: Michael Tremer Date: Sun, 12 Dec 2010 22:22:03 +0000 (+0100) Subject: Fix adding of hdd string only if no other was found. X-Git-Tag: v0.11~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17dc2486fd0eddd26c2f5bf0beda31f5d1fb62bf;p=oddments%2Ffireinfo.git Fix adding of hdd string only if no other was found. --- diff --git a/fireinfo/system.py b/fireinfo/system.py index ce0efc7..7858600 100644 --- a/fireinfo/system.py +++ b/fireinfo/system.py @@ -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: