pylint: Skip raising-bad-type

See https://github.com/PyCQA/pylint/issues/4772 for details.

Fixes: https://pagure.io/freeipa/issue/9117
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Stanislav Levin 2021-07-29 18:44:42 +03:00 committed by Rob Crittenden
parent 851f6d48ac
commit df3c40fd34
4 changed files with 8 additions and 5 deletions

View File

@ -184,7 +184,7 @@ class IPACustodiaTester:
pkey = JWK(**dictkeys[usage_id])
local_pubkey = json_decode(pkey.export_public())
except Exception:
raise self.error(
raise self.error( # pylint: disable=raising-bad-type, #4772
"Failed to load and parse local JWK.", fatal=True
)
else:
@ -193,7 +193,7 @@ class IPACustodiaTester:
))
if pkey.key_id != self.host_spn:
raise self.error(
raise self.error( # pylint: disable=raising-bad-type, #4772
"KID '{}' != host service principal name '{}' "
"(usage: {})".format(pkey.key_id, self.host_spn, usage),
fatal=True
@ -210,7 +210,7 @@ class IPACustodiaTester:
try:
host_pubkey = json_decode(find_key(self.host_spn, usage_id))
except Exception:
raise self.error(
raise self.error( # pylint: disable=raising-bad-type, #4772
"Fetching host keys {} (usage: {}) failed.".format(
self.host_spn, usage),
fatal=True
@ -223,7 +223,7 @@ class IPACustodiaTester:
if host_pubkey != local_pubkey:
self.debug("LDAP: '{}'".format(host_pubkey))
self.debug("Local: '{}'".format(local_pubkey))
raise self.error(
raise self.error( # pylint: disable=raising-bad-type, #4772
"Host key in LDAP does not match local key.",
fatal=True
)
@ -235,7 +235,7 @@ class IPACustodiaTester:
try:
server_pubkey = json_decode(find_key(self.server_spn, usage_id))
except Exception:
raise self.error(
raise self.error( # pylint: disable=raising-bad-type, #4772
"Fetching server keys {} (usage: {}) failed.".format(
self.server_spn, usage),
fatal=True

View File

@ -458,6 +458,7 @@ class IpaAdvise(admintool.AdminTool):
installutils.check_server_configuration()
if len(self.args) > 1:
# pylint: disable=raising-bad-type, #4772
raise self.option_parser.error("You can only provide one "
"positional argument.")

View File

@ -178,6 +178,7 @@ class idview(LDAPObject):
try:
orig_entry_attrs = ldap.get_entry(dn, ['objectclass'])
except errors.NotFound:
# pylint: disable=raising-bad-type, #4772
raise self.handle_not_found(*keys)
orig_objectclasses = {

View File

@ -614,6 +614,7 @@ class trust(LDAPObject):
ldap.SCOPE_SUBTREE, trustfilter, ['']
)
except errors.NotFound:
# pylint: disable=raising-bad-type, #4772
raise self.handle_not_found(keys[-1])
if len(result) > 1: