From 20409e9f28eb8af1316aeb7ee3604e463ec3e264 Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Mon, 25 Jun 2012 14:39:09 +0300 Subject: [PATCH] Use vfs_uuid instead of blkid to compute uuid vfs_uuid is more suitable for this and it whas added before blkid in guestfs, hence it is supported in more guestfs versions. --- image_creator/os_type/linux.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/image_creator/os_type/linux.py b/image_creator/os_type/linux.py index e38e777..89d5e32 100644 --- a/image_creator/os_type/linux.py +++ b/image_creator/os_type/linux.py @@ -50,10 +50,10 @@ class Linux(Unix): if dev in self._uuid: return self._uuid[dev] - for attr in self.g.blkid(dev): - if attr[0] == 'UUID': - self._uuid[dev] = attr[1] - return attr[1] + uuid = self.g.vfs_uuid(dev) + assert len(uuid) + self._uuid[dev] = uuid + return uuid @sysprep() def fix_acpid(self, print_header=True): -- 1.7.10.4