[blivet:rhel7/f21/master] Convert int to str before passing it to run_program (#1151129)
Samantha N. Bueno
sbueno+anaconda at redhat.com
Thu Oct 9 18:49:23 UTC 2014
On Thu, Oct 09, 2014 at 02:36:05PM -0400, mulhern wrote:
> Resolves: fed#1151129
> Related: rhbz#1076383
This looks ok to me.
>
> 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
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
More information about the anaconda-patches
mailing list