From 2a9836b11d0fbd1624fcc27298558932f479f231 Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Sun, 29 Apr 2012 12:56:52 +0300 Subject: [PATCH] Fix a bug introduced in commit e108efd285b34d5a28e Not all needed code parts where updated when the size() method in DiskDevice class was abandoned in favor of the size attribute. --- image_creator/disk.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/image_creator/disk.py b/image_creator/disk.py index 2fb8039..4103e10 100644 --- a/image_creator/disk.py +++ b/image_creator/disk.py @@ -271,15 +271,15 @@ class DiskDevice(object): last_partition = self.g.part_list(self.guestfs_device)[-1] - if last_partition['part_num'] > 4: + if self.parttype == 'msdos' and last_partition['part_num'] > 4: raise FatalError("This disk contains logical partitions. " "Only primary partitions are supported.") part_dev = "%s%d" % (self.guestfs_device, last_partition['part_num']) fs_type = self.g.vfs_type(part_dev) if not re.match("ext[234]", fs_type): - warn("Don't know how to resize %s partitions." % vfs_type) - return self.size() + warn("Don't know how to resize %s partitions." % fs_type) + return self.size self.g.e2fsck_f(part_dev) self.g.resize2fs_M(part_dev) -- 1.7.10.4