In the first branch of 'if' the 'disks' variable is of type
'list of tuples' whereas in the second branch ('else') it is
of type 'list of disk objects'. Fix the second one to agree
with the first.Signed-off-by: Ilias Tsitsimpis <[email protected]> --- lib/cmdlib/instance_storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmdlib/instance_storage.py b/lib/cmdlib/instance_storage.py index eea4c1b..f089c15 100644 --- a/lib/cmdlib/instance_storage.py +++ b/lib/cmdlib/instance_storage.py @@ -1115,7 +1115,7 @@ def ImageDisks(lu, instance, image, disks=None): if disks is None: disks = [(0, instance.disks[0])] else: - disks = map(lambda idx: instance.disks[idx], disks) + disks = map(lambda idx: (idx, instance.disks[idx]), disks) logging.info("Pausing synchronization of disks of instance '%s'", instance.name) -- 1.9.1
