Skip to content

Commit

Permalink
Address issues uncovered by pylint 2.15.5
Browse files Browse the repository at this point in the history
Two variables used before assignment

Three Useless suppression of 'unexpected-keyword-arg'

Fixes: #295

Signed-off-by: Rob Crittenden <[email protected]>
  • Loading branch information
rcritten committed Jul 12, 2023
1 parent 183b2f8 commit 18178ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/ipahealthcheck/ipa/certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ def check(self):

try:
if 'pwd_file' in signature(certdb.NSSDatabase).parameters:
# pylint: disable=unexpected-keyword-arg
db = certdb.NSSDatabase(
dbdir, token=token,
pwd_file=pwd_file.name if pwd_file else None)
Expand Down Expand Up @@ -624,7 +623,6 @@ def check(self):
pwd_file = get_token_password_file(self.ca.hsm_enabled,
token)

# pylint: disable=unexpected-keyword-arg
db = certdb.NSSDatabase(
paths.PKI_TOMCAT_ALIAS_DIR, token=token,
pwd_file=pwd_file.name if pwd_file else None)
Expand Down Expand Up @@ -987,7 +985,7 @@ def check(self):
key=key,
dbdir=dbdir,
nickname=nickname,
reason=response.output_error,
reason=str(e),
msg='Validation of {nickname} in {dbdir} failed: '
'{reason}')
else:
Expand Down Expand Up @@ -1251,7 +1249,6 @@ def check(self):
dbdir = request.get('cert-database')
try:
if 'pwd_file' in signature(certdb.NSSDatabase).parameters:
# pylint: disable=unexpected-keyword-arg
db = certdb.NSSDatabase(
dbdir, token=token,
pwd_file=pwd_file.name if pwd_file else None
Expand Down
2 changes: 1 addition & 1 deletion src/ipahealthcheck/ipa/trust.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def check(self):
id = pysss_nss_idmap.getnamebysid(sid + '-500')
except Exception as e:
yield Result(self, constants.ERROR,
key=id,
key='getnamebysid',
domain=domain,
error=str(e),
msg='Look up of ID {key} for {domain} failed: '
Expand Down

0 comments on commit 18178ba

Please sign in to comment.