From c70d2d9bdb25fcb5affe301b8c065607e4704a61 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 21 Dec 2009 16:44:21 +0100
Subject: [PATCH] Clarifiy some more wide pylint disables

This removes/updates some module-wide pylint disables.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Olivier Tharan <olive@google.com>
---
 lib/cmdlib.py  | 5 ++++-
 lib/locking.py | 8 ++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 8c0ec5ffc..fc95613b0 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -21,7 +21,10 @@
 
 """Module implementing the master-side code."""
 
-# pylint: disable-msg=W0613,W0201
+# pylint: disable-msg=W0201
+
+# W0201 since most LU attributes are defined in CheckPrereq or similar
+# functions
 
 import os
 import os.path
diff --git a/lib/locking.py b/lib/locking.py
index 874b7c01b..9fb650760 100644
--- a/lib/locking.py
+++ b/lib/locking.py
@@ -20,7 +20,10 @@
 
 """Module implementing the Ganeti locking code."""
 
-# pylint: disable-msg=W0613,W0201
+# pylint: disable-msg=W0212
+
+# W0212 since e.g. LockSet methods use (a lot) the internals of
+# SharedLock
 
 import threading
 # Wouldn't it be better to define LockingError in the locking module?
@@ -761,7 +764,8 @@ class GanetiLockManager:
     """
     return BGL in self.__keyring[LEVEL_CLUSTER]._list_owned()
 
-  def _contains_BGL(self, level, names): # pylint: disable-msg=C0103
+  @staticmethod
+  def _contains_BGL(level, names): # pylint: disable-msg=C0103
     """Check if the level contains the BGL.
 
     Check if acting on the given level and set of names will change
-- 
GitLab