Fix a bug introduced in 2e50092b2437913561a37c646e
[snf-image-creator] / 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()