[master 5/6] Replace _mountpoint with systemMountpoint in other modules
vojtechtrefny
installerbot-noreply at redhat.com
Wed Mar 18 15:45:31 UTC 2015
From: Vojtech Trefny <vtrefny at redhat.com>
Signed-off-by: Vojtech Trefny <vtrefny at redhat.com>
---
blivet/devices/btrfs.py | 22 +++++++++++-----------
blivet/devices/file.py | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
index 4f4ade1..dddbfbc 100644
--- a/blivet/devices/btrfs.py
+++ b/blivet/devices/btrfs.py
@@ -108,14 +108,14 @@ def _do_temp_mount(self, orig=False):
fmt.mount(mountpoint=tmpdir)
def _undo_temp_mount(self):
- if getattr(self.format, "_mountpoint", None):
+ if getattr(self.format, "systemMountpoint", None):
fmt = self.format
- elif getattr(self.originalFormat, "_mountpoint", None):
+ elif getattr(self.originalFormat, "systemMountpoint", None):
fmt = self.originalFormat
else:
return
- mountpoint = fmt._mountpoint
+ mountpoint = fmt.systemMountpoint
if os.path.basename(mountpoint).startswith(self._temp_dir_prefix):
fmt.unmount()
@@ -327,7 +327,7 @@ def listSubVolumes(self, snapshotsOnly=False):
return subvols
try:
- subvols = btrfs.list_subvolumes(self.originalFormat._mountpoint,
+ subvols = btrfs.list_subvolumes(self.originalFormat.systemMountpoint,
snapshots_only=snapshotsOnly)
except errors.BTRFSError as e:
log.debug("failed to list subvolumes: %s", e)
@@ -354,7 +354,7 @@ def removeSubVolume(self, name):
def _getDefaultSubVolumeID(self):
subvolid = None
try:
- subvolid = btrfs.get_default_subvolume(self.originalFormat._mountpoint)
+ subvolid = btrfs.get_default_subvolume(self.originalFormat.systemMountpoint)
except errors.BTRFSError as e:
log.debug("failed to get default subvolume id: %s", e)
@@ -366,7 +366,7 @@ def _setDefaultSubVolumeID(self, vol_id):
This writes the change to the filesystem, which must be mounted.
"""
try:
- btrfs.set_default_subvolume(self.originalFormat._mountpoint, vol_id)
+ btrfs.set_default_subvolume(self.originalFormat.systemMountpoint, vol_id)
except errors.BTRFSError as e:
log.error("failed to set new default subvolume id (%s): %s",
vol_id, e)
@@ -430,7 +430,7 @@ def _remove(self, member):
raise
try:
- btrfs.remove(self.originalFormat._mountpoint, member.path)
+ btrfs.remove(self.originalFormat.systemMountpoint, member.path)
finally:
self._undo_temp_mount()
@@ -442,7 +442,7 @@ def _add(self, member):
raise
try:
- btrfs.add(self.originalFormat._mountpoint, member.path)
+ btrfs.add(self.originalFormat.systemMountpoint, member.path)
finally:
self._undo_temp_mount()
@@ -527,7 +527,7 @@ def setupParents(self, orig=False):
def _create(self):
log_method_call(self, self.name, status=self.status)
self.volume._do_temp_mount()
- mountpoint = self.volume.format._mountpoint
+ mountpoint = self.volume.format.systemMountpoint
if not mountpoint:
raise RuntimeError("btrfs subvol create requires mounted volume")
@@ -547,7 +547,7 @@ def _destroy(self):
# btrfs does not allow removal of the default subvolume
self.volume._setDefaultSubVolumeID(self.volume.vol_id)
- mountpoint = self.volume.originalFormat._mountpoint
+ mountpoint = self.volume.originalFormat.systemMountpoint
if not mountpoint:
raise RuntimeError("btrfs subvol destroy requires mounted volume")
btrfs.delete_subvolume(mountpoint, self.name)
@@ -623,7 +623,7 @@ def __init__(self, *args, **kwargs):
def _create(self):
log_method_call(self, self.name, status=self.status)
self.volume._do_temp_mount()
- mountpoint = self.volume.format._mountpoint
+ mountpoint = self.volume.format.systemMountpoint
if not mountpoint:
raise RuntimeError("btrfs subvol create requires mounted volume")
diff --git a/blivet/devices/file.py b/blivet/devices/file.py
index 0997035..cd8eb79 100644
--- a/blivet/devices/file.py
+++ b/blivet/devices/file.py
@@ -65,7 +65,7 @@ def fstabSpec(self):
@property
def path(self):
try:
- root = self.parents[0].format._mountpoint
+ root = self.parents[0].format.systemMountpoint
mountpoint = self.parents[0].format.mountpoint
except (AttributeError, IndexError):
root = ""
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/858b10779a5021dcfb899f0a695d25d21ef88b36
More information about the anaconda-patches
mailing list