[PATCH] Don't mount cdroms that contain no mountable media. (#1000889)

David Lehman dlehman at redhat.com
Tue Sep 3 19:10:11 UTC 2013


---
 pyanaconda/image.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pyanaconda/image.py b/pyanaconda/image.py
index adc0660..86e7937 100644
--- a/pyanaconda/image.py
+++ b/pyanaconda/image.py
@@ -190,6 +190,10 @@ def opticalInstallMedia(devicetree, mountpoint=INSTALL_TREE):
 
     for dev in devicetree.getDevicesByType("cdrom"):
         devicetree.updateDeviceFormat(dev)
+        if not hasattr(dev.format, "mount"):
+            # no mountable media
+            continue
+
         try:
             dev.format.mount(mountpoint=mountpoint)
         except FSError:
-- 
1.8.1.4



More information about the anaconda-patches mailing list