summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2010-03-31 11:38:41 -0400
committerChris Lumens <clumens@redhat.com>2010-03-31 13:34:19 -0400
commit47d889965d4cfa97dd5bdc472425674377a1af6d (patch)
treed4fbf505baec48ac5c6fa2cca3ea07e9582289ec /yuminstall.py
parentfa174ab0e7b14fa6cd2d5d6a09f92b36b8e15bae (diff)
downloadanaconda-47d889965d4cfa97dd5bdc472425674377a1af6d.tar.gz
anaconda-47d889965d4cfa97dd5bdc472425674377a1af6d.tar.xz
anaconda-47d889965d4cfa97dd5bdc472425674377a1af6d.zip
Make sure the install.img exists before attempting to copy (#578391).
While we're able to handle the exception that results without problem (except for a scary log message), we still set self._loopbackFile in mountInstallImage so when that method fails, umountFilesystems will attempt to unmount the install.img that was never copied. And then that results in an unhandled exception.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/yuminstall.py b/yuminstall.py
index be31533e1..bb28c4e7f 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -893,9 +893,10 @@ class AnacondaYum(YumSorter):
mkeys.sort(mediasort)
stage2img = "%s/images/install.img" % self.tree
- if self.anaconda.backend.mountInstallImage(self.anaconda, stage2img):
- self.anaconda.storage.umountFilesystems()
- return DISPATCH_BACK
+ if os.path.exists(stage2img):
+ if self.anaconda.backend.mountInstallImage(self.anaconda, stage2img):
+ self.anaconda.storage.umountFilesystems()
+ return DISPATCH_BACK
for i in mkeys:
self.tsInfo.curmedia = i