Check if the anaconda stub file exists before we try to copy it

This commit is contained in:
Martin Gracik 2010-02-24 20:48:46 +01:00
parent 8c147979ce
commit d8e07aeac0
1 changed files with 2 additions and 1 deletions

View File

@ -669,7 +669,8 @@ class Install(BaseImageClass):
for stub in map(lambda s: "{0}-stub".format(s), stubs):
src = os.path.join(self.srctree, "usr/lib/anaconda", stub)
dst = os.path.join(self.srctree, "usr/bin", stub)
shutil.copy2(src, dst)
if os.path.isfile(src):
shutil.copy2(src, dst)
def copy_bootloaders(self):
srcdir = os.path.join(self.srctree, self.const.BOOTDIR)