summaryrefslogtreecommitdiffstats
path: root/ipapython/nsslib.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-01-28 14:55:20 +0100
committerMartin Kosek <mkosek@redhat.com>2013-01-29 15:40:05 +0100
commitbb9382cc415dd8ad8dce0b987e2ca7a8d0dad7bc (patch)
tree7da8338829cbeb606f16ed0b9bfe0de8dd2d884d /ipapython/nsslib.py
parent771624bb72af1d0df8aa3cf3c5a71ae28ab590d3 (diff)
downloadfreeipa.git-bb9382cc415dd8ad8dce0b987e2ca7a8d0dad7bc.tar.gz
freeipa.git-bb9382cc415dd8ad8dce0b987e2ca7a8d0dad7bc.tar.xz
freeipa.git-bb9382cc415dd8ad8dce0b987e2ca7a8d0dad7bc.zip
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
Diffstat (limited to 'ipapython/nsslib.py')
-rw-r--r--ipapython/nsslib.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/ipapython/nsslib.py b/ipapython/nsslib.py
index 7afccd56..fd74dcb7 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