From 68f52749bae19559f66d33cf842bab8cf5a6df8f Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Fri, 26 Feb 2010 11:08:30 +0100 Subject: [PATCH] Remove old boot.iso if it exists --- src/pylorax/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 3aaf0d70..4e4dde2c 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -297,6 +297,10 @@ class Lorax(BaseLoraxClass): self.treeinfo_add_section(self.conf.treeinfo, section, data) # move the boot iso to the images directory + dst = os.path.join(self.conf.imgdir, os.path.basename(bootiso)) + if os.path.isfile(dst): + os.unlink(dst) + shutil.move(bootiso, self.conf.imgdir) # copy the treeinfo and discinfo to the output directory