Remove old install.img if it already exists

This commit is contained in:
Martin Gracik 2010-02-26 10:51:58 +01:00
parent 1b6e55d528
commit 4d3393b152

View File

@ -281,6 +281,10 @@ class Lorax(BaseLoraxClass):
self.treeinfo_add_section(self.conf.treeinfo, section, data) self.treeinfo_add_section(self.conf.treeinfo, section, data)
# move the install image to the images directory # move the install image to the images directory
dst = os.path.join(self.conf.imgdir, os.path.basename(installimg))
if os.path.isfile(dst):
os.unlink(dst)
shutil.move(installimg, self.conf.imgdir) shutil.move(installimg, self.conf.imgdir)
# create the boot iso image # create the boot iso image