[molecule.specs.plugins] always return int from GenericExecutionStep.setup()

This commit is contained in:
Fabio Erculiani
2010-08-08 15:08:02 +02:00
parent a345bbf581
commit 87c475aadd
3 changed files with 8 additions and 0 deletions
+4
View File
@@ -89,6 +89,7 @@ class MirrorHandler(GenericExecutionStep, BuiltinHandlerMixin):
)
if not os.path.isdir(self.dest_dir):
os.makedirs(self.dest_dir, 0o755)
return 0
def pre_run(self):
self._output.output("[%s|%s] %s" % (
@@ -181,6 +182,7 @@ class ChrootHandler(GenericExecutionStep, BuiltinHandlerMixin):
self.metadata['destination_chroot'], "chroot",
os.path.basename(self.source_dir)
)
return 0
def pre_run(self):
self._output.output("[%s|%s] %s" % (
@@ -359,6 +361,7 @@ class CdrootHandler(GenericExecutionStep, BuiltinHandlerMixin):
molecule.utils.empty_dir(self.dest_root)
if not os.path.isdir(self.dest_root):
os.makedirs(self.dest_root, 0o755)
return 0
def pre_run(self):
self._output.output("[%s|%s] %s" % (
@@ -493,6 +496,7 @@ class IsoHandler(GenericExecutionStep, BuiltinHandlerMixin):
self.metadata['destination_chroot'], "chroot",
os.path.basename(self.source_chroot)
)
return 0
def pre_run(self):
self._output.output("[%s|%s] %s" % (
@@ -200,6 +200,7 @@ class ChrootHandler(BuiltinChrootHandler):
# to make superclass working
self.source_dir = self.metadata['chroot_unpack_path']
self.dest_dir = self.source_dir
return 0
def kill(self, success = True):
BuiltinChrootHandler.kill(self, success = success)
@@ -276,6 +277,7 @@ class CdrootHandler(BuiltinCdrootHandler):
def setup(self):
self.dest_root = self.metadata['cdroot_path']
self.source_chroot = self.metadata['chroot_unpack_path']
return 0
def kill(self, success = True):
BuiltinCdrootHandler.kill(self, success = success)
@@ -298,6 +300,7 @@ class IsoHandler(BuiltinIsoHandler):
self.iso_title = self.metadata.get('iso_title', 'Molecule remaster')
self.source_chroot = self.metadata['chroot_unpack_path']
self.chroot_dir = self.source_chroot
return 0
def kill(self, success = True):
BuiltinIsoHandler.kill(self, success = success)
+1
View File
@@ -53,6 +53,7 @@ class TarHandler(GenericExecutionStep, BuiltinHandlerMixin):
self.dest_path = os.path.join(
self.metadata['destination_tar_directory'], tar_name)
self.chroot_path = self.metadata['chroot_unpack_path']
return 0
def pre_run(self):
self._output.output("[%s|%s] %s" % (