From f3196d689980a66bc504348028d0ed4f30bfe220 Mon Sep 17 00:00:00 2001
From: Helga Velroyen <helgav@google.com>
Date: Wed, 21 Nov 2012 11:35:18 +0100
Subject: [PATCH] Fix lint error about too many variables

Lint complains about too many variables in the CheckPrereq
method. While I think that this method/class would need
some refactoring in general, at least this patch makes lint
shut up for now.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
---
 lib/cmdlib.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 29b527fc6..163baad48 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -13346,11 +13346,11 @@ class LUInstanceSetParams(LogicalUnit):
       res_min = _ComputeIPolicyInstanceSpecViolation(ipolicy, ispec_min)
 
       if (res_max or res_min):
-        res = set(res_max + res_min)
         # FIXME: Improve error message by including information about whether
         # the upper or lower limit of the parameter fails the ipolicy.
         msg = ("Instance allocation to group %s (%s) violates policy: %s" %
-               (group_info, group_info.name, utils.CommaJoin(res)))
+               (group_info, group_info.name,
+                utils.CommaJoin(set(res_max + res_min))))
         raise errors.OpPrereqError(msg, errors.ECODE_INVAL)
 
   def _ConvertPlainToDrbd(self, feedback_fn):
-- 
GitLab