[master 1/1] Only prepend the root to get the ondisk path if there is some
vpodzime
installerbot-noreply at redhat.com
Fri Nov 13 09:38:26 UTC 2015
From: Vratislav Podzimek <vpodzime at redhat.com>
Otherwise we get things like this:
'/home/user/sources/blivet/None/sys/devices/.../block/sda/size'
which is not really what we want.
---
blivet/util.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/blivet/util.py b/blivet/util.py
index 8967086..562b20e 100644
--- a/blivet/util.py
+++ b/blivet/util.py
@@ -58,7 +58,10 @@ def ondisk(self):
""" Path.ondisk evaluates as the real filesystem path of the path,
including the path's root in the data.
"""
- return normalize_path_slashes(Path(self.root) + Path(self.path))
+ if self.root:
+ return normalize_path_slashes(Path(self.root) + Path(self.path))
+ else:
+ return Path(self.path)
@property
def path(self):
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/fc04bc8f4ab057fa73ac448402fdc167d653267b
More information about the anaconda-patches
mailing list