Fix backend.GetVolumeList handling of LVM output
authorIustin Pop <iustin@google.com>
Fri, 11 Jul 2008 13:23:35 +0000 (13:23 +0000)
committerIustin Pop <iustin@google.com>
Fri, 11 Jul 2008 13:23:35 +0000 (13:23 +0000)
commitdf4c2628f113ed20a4c2f367465cab94d508db8a
treee0fe77a51e2be9a915f3443b90c2ebd285446017
parent1df6506cc972b17def064d95dc23d7d759a41164
Fix backend.GetVolumeList handling of LVM output

Sometimes ‘lvs’ can spit error messages on stdout, even when one wants
to parse the output:
...
Inconsistent metadata copies found - updating to use version 2776
...

So we need to validate the output to guard against such cases.

The patch converts the split on the separater to match against a regex
and extract the fields via groups. The original separator choice is a
bad one now :(

Reviewed-by: imsnah
lib/backend.py