Disable pylint E1101 on hypothetical import
authorKlaus Aehlig <aehlig@google.com>
Wed, 26 Jun 2013 10:49:10 +0000 (12:49 +0200)
committerKlaus Aehlig <aehlig@google.com>
Wed, 26 Jun 2013 10:58:10 +0000 (12:58 +0200)
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 <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

lib/netutils.py

index 596f6a1..b57ea25 100644 (file)
@@ -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