diff options
author | Martin Sivak <msivak@redhat.com> | 2009-07-17 09:56:24 +0200 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2009-07-17 17:10:50 +0200 |
commit | 6dc159708058136522c9ec2f62287a1d0c22f0a4 (patch) | |
tree | bef46a9fe5976878190fe86fddb74d3f5fbefb30 | |
parent | d246f6197499f9f300ac458e7705799d442b5bd7 (diff) | |
download | anaconda-6dc159708058136522c9ec2f62287a1d0c22f0a4.tar.gz anaconda-6dc159708058136522c9ec2f62287a1d0c22f0a4.tar.xz anaconda-6dc159708058136522c9ec2f62287a1d0c22f0a4.zip |
Stop the cdrom device before ejecting (#505067)
-rw-r--r-- | storage/devices.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/devices.py b/storage/devices.py index 02c694581..5bfd31ffd 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -2993,6 +2993,9 @@ class OpticalDevice(StorageDevice): if not self.exists: raise DeviceError("device has not been created", self.path) + #try to umount and close device before ejecting + self.teardown() + # Make a best effort attempt to do the eject. If it fails, it's not # critical. fd = os.open(self.path, os.O_RDONLY | os.O_NONBLOCK) |