]> git.ipfire.org Git - oddments/fireinfo.git/commitdiff
It would be better to check for pakfire ID after sorting out bad values.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 10 Dec 2010 23:43:51 +0000 (00:43 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 10 Dec 2010 23:43:51 +0000 (00:43 +0100)
fireinfo/system.py

index b3ae92241f479d3595247fce91d4d3c7c1594747..5dd4f0c137871ea89063f32981a9c74e473fe989 100644 (file)
@@ -193,11 +193,6 @@ class System(object):
                if root_disk_serial:
                        ids.append(root_disk_serial)
 
-               # As last resort, we use the UUID from pakfire.
-               if not ids:
-                       id = read_from_file("/opt/pakfire/db/uuid")
-                       ids.append(id)
-
                # Sort out all bogous or invalid strings from the list.
                _ids = []
                for id in ids:
@@ -211,6 +206,11 @@ class System(object):
 
                ids = _ids
 
+               # As last resort, we use the UUID from pakfire.
+               if not ids:
+                       id = read_from_file("/opt/pakfire/db/uuid")
+                       ids.append(id)
+
                return "#".join(ids)
 
        @property