From 77bb4b517769f7707514b0f7e3da5762ff0f1cc4 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 28 Jan 2013 14:55:20 +0100 Subject: Pylint cleanup. Add more dynamic attribute info to IPATypeChecker in make-lint. Remove unnecessary pylint comments. Fix false positivies introduced by Pylint 0.26. https://fedorahosted.org/freeipa/ticket/3379 --- ipapython/nsslib.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'ipapython/nsslib.py') diff --git a/ipapython/nsslib.py b/ipapython/nsslib.py index 7afccd568..fd74dcb74 100644 --- a/ipapython/nsslib.py +++ b/ipapython/nsslib.py @@ -200,14 +200,15 @@ class NSSConnection(httplib.HTTPConnection, NSSAddressFamilyFallback): def _create_socket(self): # TODO: remove the try block once python-nss is guaranteed to contain # these values - try : - ssl_enable_renegotiation = SSL_ENABLE_RENEGOTIATION #pylint: disable=E0602 - ssl_require_safe_negotiation = SSL_REQUIRE_SAFE_NEGOTIATION #pylint: disable=E0602 - ssl_renegotiate_requires_xtn = SSL_RENEGOTIATE_REQUIRES_XTN #pylint: disable=E0602 - except : - ssl_enable_renegotiation = 20 - ssl_require_safe_negotiation = 21 - ssl_renegotiate_requires_xtn = 2 + try: + #pylint: disable=E1101 + ssl_enable_renegotiation = ssl.SSL_ENABLE_RENEGOTIATION + ssl_require_safe_negotiation = ssl.SSL_REQUIRE_SAFE_NEGOTIATION + ssl_renegotiate_requires_xtn = ssl.SSL_RENEGOTIATE_REQUIRES_XTN + except: + ssl_enable_renegotiation = 20 + ssl_require_safe_negotiation = 21 + ssl_renegotiate_requires_xtn = 2 # Create the socket here so we can do things like let the caller # override the NSS callbacks -- cgit