From 87c475aadd25b8c7ffdf658351701a9283fdf25e Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 8 Aug 2010 15:08:02 +0200 Subject: [PATCH] [molecule.specs.plugins] always return int from GenericExecutionStep.setup() --- molecule/specs/plugins/builtin_plugin.py | 4 ++++ molecule/specs/plugins/remaster_plugin.py | 3 +++ molecule/specs/plugins/tar_plugin.py | 1 + 3 files changed, 8 insertions(+) diff --git a/molecule/specs/plugins/builtin_plugin.py b/molecule/specs/plugins/builtin_plugin.py index 1d07915..b49b639 100644 --- a/molecule/specs/plugins/builtin_plugin.py +++ b/molecule/specs/plugins/builtin_plugin.py @@ -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" % ( diff --git a/molecule/specs/plugins/remaster_plugin.py b/molecule/specs/plugins/remaster_plugin.py index b0a7367..3afb841 100644 --- a/molecule/specs/plugins/remaster_plugin.py +++ b/molecule/specs/plugins/remaster_plugin.py @@ -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) diff --git a/molecule/specs/plugins/tar_plugin.py b/molecule/specs/plugins/tar_plugin.py index 5470a6d..668771f 100644 --- a/molecule/specs/plugins/tar_plugin.py +++ b/molecule/specs/plugins/tar_plugin.py @@ -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" % (