Fix a bug introduced in 2e50092b2437913561a37c646e
authorNikos Skalkotos <skalkoto@grnet.gr>
Wed, 20 Jun 2012 23:13:59 +0000 (02:13 +0300)
committerNikos Skalkotos <skalkoto@grnet.gr>
Wed, 20 Jun 2012 23:13:59 +0000 (02:13 +0300)
The do_sysprep method was not updated to comply with the changes
made in list_syspreps method

image_creator/os_type/__init__.py

index a48a370..5601a87 100644 (file)
@@ -209,10 +209,12 @@ class OSBase(object):
 
         self.out.output('Preparing system for image creation:')
 
-        tasks, _ = self.list_syspreps()
-        size = len(tasks)
+        tasks = self.list_syspreps()
+        enabled = filter(lambda x: x.enabled, tasks)
+
+        size = len(enabled)
         cnt = 0
-        for task in tasks:
+        for task in enabled:
             cnt += 1
             self.out.output(('(%d/%d)' % (cnt, size)).ljust(7), False)
             task()