Re: [PATCH 2/5] Add function lvorigin to determine the name of a snapshot's origin lv.

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

 



> +def lvorigin(vg_name, lv_name):
> +    args = ["lvs", "--noheadings", "-o", "origin"] + \
> +            config_args + \
> +            ["%s/%s" % (vg_name, lv_name)]
> +
> +    buf = iutil.execWithCapture("lvm",
> +                                args,
> +                                stderr="/dev/tty5")
> +
> +    try:
> +        origin = buf.splitlines()[0].strip()
> +    except IndexError:
> +        origin = ''
> +
> +    return origin
> +
>  def lvcreate(vg_name, lv_name, size):
>      args = ["lvcreate"] + \
>              ["-L", "%dm" % size] + \

Looks fine, provided all callers of lvorigin know what to do with ''.
I'll check for that on the rest of the patch reviews.

- 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