module = None
classname = None
try:
- module = __import__("image_creator.os_type.%s"
- % distro, fromlist=['image_creator.os_type'])
+ module = __import__("image_creator.os_type.%s" % distro,
+ fromlist=['image_creator.os_type'])
classname = distro.capitalize()
except ImportError:
- module = __import__("image_creator.os_type.%s"
- % osfamily, fromlist=['image_creator.os_type'])
+ module = __import__("image_creator.os_type.%s" % osfamily,
+ fromlist=['image_creator.os_type'])
classname = osfamily.capitalize()
return getattr(module, classname)
def list_syspreps(self):
- objs = [getattr(self, name) for name in dir(self) \
- if not name.startswith('_')]
+ objs = [getattr(self, name) for name in dir(self)
+ if not name.startswith('_')]
return [x for x in objs if self._is_sysprep(x)]
return method
def enable_sysprep(self, obj):
- """Enable a system preperation operation"""
+ """Enable a system preparation operation"""
setattr(obj.im_func, 'enabled', True)
def disable_sysprep(self, obj):
- """Disable a system preperation operation"""
+ """Disable a system preparation operation"""
setattr(obj.im_func, 'enabled', False)
def print_syspreps(self):
- """Print enabled and disabled system preperation operations."""
+ """Print enabled and disabled system preparation operations."""
syspreps = self.list_syspreps()
enabled = filter(lambda x: x.enabled, syspreps)
wrapper.initial_indent = '\t'
wrapper.width = 72
- self.out.output("Enabled system preperation operations:")
+ self.out.output("Enabled system preparation operations:")
if len(enabled) == 0:
self.out.output("(none)")
else:
descr = wrapper.fill(textwrap.dedent(sysprep.__doc__))
self.out.output(' %s:\n%s\n' % (name, descr))
- self.out.output("Disabled system preperation operations:")
+ self.out.output("Disabled system preparation operations:")
if len(disabled) == 0:
self.out.output("(none)")
else: