summaryrefslogtreecommitdiffstats
path: root/ipapython/nsslib.py
diff options
context:
space:
mode:
authorJan Barta <55042barta@sstebrno.eu>2016-06-02 09:58:52 +0200
committerMartin Basti <mbasti@redhat.com>2016-09-22 16:52:57 +0200
commit36484e8672f5ee1fdc2bd57622e330ab8dbb7671 (patch)
tree1f06a3e4aebbc0e6e7fe28e15c9e677e396932a3 /ipapython/nsslib.py
parent929086e0992cc32a654b4dfa435f536ecb0c665b (diff)
downloadfreeipa-36484e8672f5ee1fdc2bd57622e330ab8dbb7671.tar.gz
freeipa-36484e8672f5ee1fdc2bd57622e330ab8dbb7671.tar.xz
freeipa-36484e8672f5ee1fdc2bd57622e330ab8dbb7671.zip
pylint: fix simplifiable-if-statement warnings
fix inefficient if statements, enable pylint check Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Diffstat (limited to 'ipapython/nsslib.py')
-rw-r--r--ipapython/nsslib.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/ipapython/nsslib.py b/ipapython/nsslib.py
index b5e5b6586..1573de96f 100644
--- a/ipapython/nsslib.py
+++ b/ipapython/nsslib.py
@@ -74,10 +74,7 @@ def auth_certificate_callback(sock, check_sig, is_server, certdb):
', '.join(nss.cert_usage_flags(intended_usage)))
# Is the intended usage a proper subset of the approved usage
- if approved_usage & intended_usage:
- cert_is_valid = True
- else:
- cert_is_valid = False
+ cert_is_valid = bool(approved_usage & intended_usage)
# If this is a server, we're finished
if is_server or not cert_is_valid: