From d2cb8a7be99fe37d3d1ce12f77d960768057b3cc Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 26 Aug 2010 21:21:23 +0200 Subject: [PATCH] [molecule.specs.plugins] TarHandler: always cleanup chroot temp directory --- molecule/specs/plugins/tar_plugin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/molecule/specs/plugins/tar_plugin.py b/molecule/specs/plugins/tar_plugin.py index 6ddf273..c5a9384 100644 --- a/molecule/specs/plugins/tar_plugin.py +++ b/molecule/specs/plugins/tar_plugin.py @@ -160,10 +160,10 @@ class TarHandler(GenericExecutionStep, BuiltinHandlerMixin): def kill(self, success = True): if not success: self._run_error_script(None, self.chroot_path, None) - try: - shutil.rmtree(self.metadata['chroot_tmp_dir'], True) - except (shutil.Error, OSError,): - pass + try: + shutil.rmtree(self.metadata['chroot_tmp_dir'], True) + except (shutil.Error, OSError,): + pass return 0 class IsoToTarSpec(GenericSpec):