0026-misc-fix-simplifiable-if-statement-pylint-error-5698.patch
src/authentic2/disco_service/disco_responder.py | ||
---|---|---|
172 | 172 |
returnIDParam = request.GET.get('returnIDParam', 'entityID') |
173 | 173 |
# XXX: isPassive is unused |
174 | 174 |
isPassive = request.GET.get('isPassive', '') |
175 |
if isPassive and isPassive == 'true': |
|
176 |
isPassive = True |
|
177 |
else: |
|
178 |
isPassive = False |
|
175 |
isPassive = bool(isPassive == 'true') |
|
179 | 176 | |
180 | 177 |
if not entityID: |
181 | 178 |
message = _('missing mandatory parameter entityID') |
src/authentic2/saml/x509utils.py | ||
---|---|---|
82 | 82 |
if rc2 != 0: |
83 | 83 |
rc2, modulus2 = _call_openssl(['dsa', '-in', privatekey_file.name, '-noout', '-modulus']) |
84 | 84 | |
85 |
if rc1 == 0 and rc2 == 0 and modulus1 == modulus2: |
|
86 |
return True |
|
87 |
else: |
|
88 |
return False |
|
85 |
return bool(rc1 == 0 and rc2 == 0 and modulus1 == modulus2) |
|
89 | 86 | |
90 | 87 | |
91 | 88 |
def generate_rsa_keypair(numbits=1024): |
92 |
- |