From a3e964cf54dd8c5aa1c0ae9cee6fd20a2ada6ff3 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 26 Jun 2013 12:49:10 +0200 Subject: [PATCH] Disable pylint E1101 on hypothetical import In some versions of python the module IN does not provide the constant SO_PEERCRED (issue 191). So in commit 069a4b a work around was added. However, this work around still leaves lint warnings when working with those versions of python. So disable this warning during the work around, so that users of these python versions can still develop and contribute to ganeti. Signed-off-by: Klaus Aehlig Reviewed-by: Thomas Thrainer Reviewed-by: Helga Velroyen --- lib/netutils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/netutils.py b/lib/netutils.py index 596f6a1..b57ea25 100644 --- a/lib/netutils.py +++ b/lib/netutils.py @@ -54,6 +54,7 @@ _STRUCT_UCRED_SIZE = struct.calcsize(_STRUCT_UCRED) # Workaround a bug in some linux distributions that don't define SO_PEERCRED try: + # pylint: disable=E1101 _SO_PEERCRED = IN.SO_PEERCRED except AttributeError: _SO_PEERCRED = 17 -- 1.7.10.4