mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
lint: Make Pylint-2.4 happy again
This is the first time running Pylint-2.4 over the whole IPA codebase.
```
Pylint on /usr/bin/python is running, please wait ...
internal error with sending report for module ['ipaserver/plugins/serverroles.py']
maximum recursion depth exceeded while calling a Python object
************* Module ipatests.test_integration.base
ipatests/test_integration/base.py:84: [W0125(using-constant-test), IntegrationTest.install] Using a conditional statement with a constant value)
************* Module ipaserver.install.ipa_cacert_manage
ipaserver/install/ipa_cacert_manage.py:522: [R1724(no-else-continue), CACertManage.delete] Unnecessary "elif" after "continue")
```
The latest Pylint (via the Tox task) checks only:
```
{envsitepackagesdir}/ipaclient \
{envsitepackagesdir}/ipalib \
{envsitepackagesdir}/ipapython
```
, while the distro-Pylint runs over all project but it is not fresh.
That's why these warnings/errors weren't exposed before now.
Concerning `internal error`: a fix was accepted by upstream:
https://github.com/PyCQA/pylint/issues/3245, but wasn't released yet.
Until that is done, Pylint just warns.
Related: https://pagure.io/freeipa/issue/8116
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Alexander Bokovoy
parent
a309de6c08
commit
ba12165eaf
@@ -521,7 +521,7 @@ class CACertManage(admintool.AdminTool):
|
||||
for ca_nickname, _trust_flags in loaded:
|
||||
if ca_nickname == nickname:
|
||||
continue
|
||||
elif ipa_ca_nickname == nickname:
|
||||
if ipa_ca_nickname == nickname:
|
||||
raise admintool.ScriptError(
|
||||
"The IPA CA cannot be removed")
|
||||
logger.debug("Verifying %s", ca_nickname)
|
||||
|
||||
@@ -77,7 +77,7 @@ class IntegrationTest:
|
||||
else:
|
||||
domain_level = cls.master.config.domain_level
|
||||
|
||||
if cls.master.config.fips_mode:
|
||||
if cls.master.config.fips_mode: # pylint: disable=using-constant-test
|
||||
cls.fips_mode = True
|
||||
if cls.fips_mode:
|
||||
cls.enable_fips_mode()
|
||||
|
||||
Reference in New Issue
Block a user