From: Michael Tremer Date: Fri, 10 Dec 2010 23:43:51 +0000 (+0100) Subject: It would be better to check for pakfire ID after sorting out bad values. X-Git-Tag: v0.7~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f05eac0d25b87fc0d286f3797efbc54f39018c55;p=oddments%2Ffireinfo.git It would be better to check for pakfire ID after sorting out bad values. --- diff --git a/fireinfo/system.py b/fireinfo/system.py index b3ae922..5dd4f0c 100644 --- a/fireinfo/system.py +++ b/fireinfo/system.py @@ -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