Remove old boot.iso if it exists

This commit is contained in:
Martin Gracik 2010-02-26 11:08:30 +01:00
parent 4d3393b152
commit 68f52749ba

View File

@ -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