From dcde0241a37aecea0a6949943607e44e660fd08c Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Mon, 8 Sep 2008 15:53:01 +0000
Subject: [PATCH] OpVerifyDisks returns a list, not a tuple

Fixing the check in gnt-cluster, or gnt-cluster verify-disks is broken.
Since the version in 1.2 used to return a tuple we'll accept both.

Reviewed-by: iustinp
---
 scripts/gnt-cluster | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster
index 55b46a170..31e64259c 100755
--- a/scripts/gnt-cluster
+++ b/scripts/gnt-cluster
@@ -236,7 +236,7 @@ def VerifyDisks(opts, args):
   """
   op = opcodes.OpVerifyDisks()
   result = SubmitOpCode(op)
-  if not isinstance(result, tuple) or len(result) != 4:
+  if not isinstance(result, (list, tuple)) or len(result) != 4:
     raise errors.ProgrammerError("Unknown result type for OpVerifyDisks")
 
   nodes, nlvm, instances, missing = result
-- 
GitLab