[master 1/2] Include details when umount fails

bcl installerbot-noreply at redhat.com
Wed Jul 29 23:07:38 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

Add the mountpoint and the rc value to the FSError message. Details and
output of lsof are still available in program.log, this just makes the
error more clear to whoever catches it.
---
 blivet/formats/fs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 90cbca6..0017b88 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -629,7 +629,7 @@ def _teardown(self, **kwargs):
         if rc:
             # try and catch whatever is causing the umount problem
             util.run_program(["lsof", mountpoint])
-            raise FSError("umount failed")
+            raise FSError("umount of %s failed (%d)" % (mountpoint, rc))
 
         if mountpoint == self._chrootedMountpoint:
             self._chrootedMountpoint = None


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/69964911faaf6b7c859fbe26f50a1851f2eefaf1


More information about the anaconda-patches mailing list