[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



---
 src/pylorax/images.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/pylorax/images.py b/src/pylorax/images.py
index f97d1a9..faba9e6 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)
-- 
1.6.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]