Quell remaining pylint 1.6.4 warnings after merge
authorBrian Foley <bpfoley@google.com>
Mon, 19 Dec 2016 14:19:09 +0000 (14:19 +0000)
committerBrian Foley <bpfoley@google.com>
Mon, 19 Dec 2016 16:07:34 +0000 (16:07 +0000)
These should all be harmless modifications with no functional change.

Signed-off-by: Brian Foley <bpfoley@google.com>
Reviewed-by: Federico Pareschi <morg@google.com>

lib/backend.py
lib/cmdlib/instance_set_params.py
lib/hypervisor/hv_kvm/__init__.py
lib/rapi/testutils.py

index 9a4d205..58f4ebd 100644 (file)
@@ -1683,8 +1683,8 @@ def AddNodeSshKeyBulk(node_list,
 
 
 # TODO: will be fixed with pending patch series.
-# pylint: disable=R0913
-def RemoveNodeSshKey(node_uuid, node_name,
+def RemoveNodeSshKey(node_uuid, # pylint: disable=R0913
+                     node_name,
                      master_candidate_uuids,
                      potential_master_candidates,
                      master_uuid=None,
@@ -2002,7 +2002,6 @@ def RemoveNodeSshKeyBulk(node_list,
       ssh.RemovePublicKey(node_uuid, key_file=pub_key_file)
 
   return result_msgs
-# pylint: enable=R0913
 
 
 def RemoveSshKeyFromPublicKeyFile(node_name,
index fdcd877..d443c9c 100644 (file)
@@ -993,9 +993,10 @@ class LUInstanceSetParams(LogicalUnit):
                    if self.op.os_name and not self.op.force
                    else self.instance.os)
 
-    if (self.op.osparams or self.op.osparams_private or
-        self.op.clear_osparams or self.op.clear_osparams_private or
-        self.op.remove_osparams or self.op.remove_osparams_private):
+    if compat.any(
+        self.op.osparams, self.op.osparams_private,
+        self.op.clear_osparams, self.op.clear_osparams_private,
+        self.op.remove_osparams, self.op.remove_osparams_private):
       public_parms = self.op.osparams or {}
       private_parms = self.op.osparams_private or {}
       remove_osparams = self.op.remove_osparams or []
index 2e57080..15f75ef 100644 (file)
@@ -907,6 +907,9 @@ class KVMHypervisor(hv_base.BaseHypervisor):
       target_process.set_cpu_affinity(range(psutil.cpu_count()))
     else:
       target_process.set_cpu_affinity(cpus)
+      # psutil 2.x deprecated (but still supports) get_children and the wrapper
+      # method sig doesn't show the keyword args, so quell the pylint warning.
+      # pylint: disable=E1123
       for p in target_process.get_children(recursive=True):
         p.set_cpu_affinity(cpus)
 
index 0020c86..6b5c29d 100644 (file)
@@ -362,7 +362,7 @@ class InputTestClient(object):
     password = utils.GenerateSecret()
 
     # pylint: disable=W0232
-    class SimpleAuthenticator():
+    class SimpleAuthenticator(object):
       # pylint: disable=R0201
       def ValidateRequest(self, req, _handler_access, _realm):
         """Called to verify user credentials given in HTTP request.