[blivet:master 01/14] Change to a semantically equivalent version of FileDevice.path

mulhern amulhern at redhat.com
Fri Mar 28 22:50:26 UTC 2014


Prompted by an unused variable status message.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devices.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/blivet/devices.py b/blivet/devices.py
index 5e9b0b7..93f6d28 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -3988,20 +3988,14 @@ class FileDevice(StorageDevice):
 
     @property
     def path(self):
-        root = ""
         try:
-            status = self.parents[0].format.status
+            root = self.parents[0].format._mountpoint
+            mountpoint = self.parents[0].format.mountpoint
         except (AttributeError, IndexError):
-            # either this device has no parents or something is wrong with
-            # the first one
-            status = (os.access(self.name, os.R_OK) and
-                      self.parents in ([], None))
+            root = ""
         else:
-            # this is the actual active mountpoint
-            root = self.parents[0].format._mountpoint
             # trim the mountpoint down to the chroot since we already have
             # the otherwise fully-qualified path
-            mountpoint = self.parents[0].format.mountpoint
             while mountpoint.endswith("/"):
                 mountpoint = mountpoint[:-1]
             if mountpoint:
-- 
1.8.3.1



More information about the anaconda-patches mailing list