[molecule.specs.plugins] TarHandler: always cleanup chroot temp directory

This commit is contained in:
Fabio Erculiani
2010-08-26 21:21:23 +02:00
parent a1732680e5
commit d2cb8a7be9
+4 -4
View File
@@ -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):