[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [PATCH] Be more careful when selecting a vg name.
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Subject: Re: [PATCH] Be more careful when selecting a vg name.
- Date: Mon, 9 Mar 2009 14:29:58 -0400
> 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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]