From a17a7623e5b559d83f486002d9a9e00b762cd6af Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Fri, 11 Jul 2008 13:54:57 +0000 Subject: [PATCH] Fix backend.NodeVolumes handling of LVM output This is the same fix as for GetVolumeList. I've checked manually and all other places that call lvm commands are already checking the output validity in terms of correct number of fields. Reviewed-by: ultrotter --- lib/backend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/backend.py b/lib/backend.py index f0569750d..7d51df0a8 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -309,7 +309,8 @@ def NodeVolumes(): 'vg': line[3].strip(), } - return [map_line(line.split('|')) for line in result.stdout.splitlines()] + return [map_line(line.split('|')) for line in result.stdout.splitlines() + if line.count('|') >= 3] def BridgesExist(bridges_list): -- GitLab