Re: [PATCH] Be more careful when selecting a vg name.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py
> index bdb732a..e5b0bd9 100644
> --- a/storage/devicelibs/lvm.py
> +++ b/storage/devicelibs/lvm.py
> @@ -236,6 +236,20 @@ def vginfo(vg_name):
>       d['pe_count'],d['pe_free'],d['pv_count']) = info
>      return d
>  
> +def vgdetectednames():
> +    """ Will run vgs and return all the detected names.
> +
> +    There is a change that there are vgnames that are recognized by lvm.
> +    It is important to know what these vgs are.
> +    """
> +    retval = []
> +    names = iutil.execWithCapture("lvm",
> +            ["vgs", "--noheadings", "-o", "vg_name"],
> +            stderr="/dev/tty5")
> +    for name in names.strip("\n").split("\n"):
> +        retval.append(name.strip())
> +    return retval
> +

I like, but how are you going to split on a newline if you've already
stripped it off?

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux