From d8e07aeac0532f68123fa57b4ba9d35a9f0cd221 Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Wed, 24 Feb 2010 20:48:46 +0100 Subject: [PATCH] Check if the anaconda stub file exists before we try to copy it --- src/pylorax/images.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pylorax/images.py b/src/pylorax/images.py index f97d1a97..faba9e60 100644 --- a/src/pylorax/images.py +++ b/src/pylorax/images.py @@ -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)