[blivet:rhel7/f21/master] Convert int to str before passing it to run_program (#1151129)
mulhern
amulhern at redhat.com
Thu Oct 9 18:36:05 UTC 2014
Resolves: fed#1151129
Related: rhbz#1076383
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/devicelibs/btrfs.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/blivet/devicelibs/btrfs.py b/blivet/devicelibs/btrfs.py
index 94aefaa..b23306e 100644
--- a/blivet/devicelibs/btrfs.py
+++ b/blivet/devicelibs/btrfs.py
@@ -152,10 +152,16 @@ def get_default_subvolume(mountpoint):
return default
def set_default_subvolume(mountpoint, subvol_id):
+ """ Sets the subvolume of mountpoint which is mounted as default.
+
+ :param str mountpoint: path of mountpoint
+ :param subvol_id: the subvolume id to set as the default
+ :type subvol_id: str or int
+ """
if not os.path.ismount(mountpoint):
raise ValueError("volume not mounted")
- args = ["subvol", "set-default", subvol_id, mountpoint]
+ args = ["subvol", "set-default", str(subvol_id), mountpoint]
return btrfs(args)
def create_snapshot(source, dest, ro=False):
--
1.9.3
More information about the anaconda-patches
mailing list