mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Enable pylint expression-not-assigned check
Enables check and fixes:
************* Module ipa-replica-conncheck
install/tools/ipa-replica-conncheck:150:
[W0106(expression-not-assigned), parse_options] Expression
"(replica_group.add_option('-w', '--password', dest='password',
sensitive=True, help='Password for the principal'), )" is assigned to
nothing)
************* Module ipatests.test_xmlrpc.test_automount_plugin
ipatests/test_xmlrpc/test_automount_plugin.py:437:
[W0106(expression-not-assigned),
test_automount_indirect.test_1a_automountmap_add_indirect] Expression
"api.Command['automountmap_add_indirect'](self.locname, self.mapname,
**self.map_kw)['result']" is assigned to nothing)
************* Module ipatests.test_ipaserver.test_otptoken_import
ipatests/test_ipaserver/test_otptoken_import.py:128:
[W0106(expression-not-assigned), test_otptoken_import.test_mini]
Expression "[(t.id, t.options) for t in doc.getKeyPackages()]" is
assigned to nothing)
************* Module ipatests.test_ipaserver.test_ldap
ipatests/test_ipaserver/test_ldap.py:221:
[W0106(expression-not-assigned), test_LDAPEntry.test_popitem] Expression
"list(e) == []" is assigned to nothing)
************* Module ipa-client-install
ipa-client/ipa-install/ipa-client-install:114:
[W0106(expression-not-assigned), parse_options] Expression
"(basic_group.add_option('-p', '--principal', dest='principal',
help='principal to use to join the IPA realm'), )" is assigned to
nothing)
ipa-client/ipa-install/ipa-client-install:116:
[W0106(expression-not-assigned), parse_options] Expression
"(basic_group.add_option('-w', '--password', dest='password',
sensitive=True, help='password to join the IPA realm (assumes bulk
password unless principal is also set)'), )" is assigned to nothing)
ipa-client/ipa-install/ipa-client-install:118:
[W0106(expression-not-assigned), parse_options] Expression
"(basic_group.add_option('-k', '--keytab', dest='keytab', help='path to
backed up keytab from previous enrollment'), )" is assigned to nothing)
ipa-client/ipa-install/ipa-client-install:120:
[W0106(expression-not-assigned), parse_options] Expression
"(basic_group.add_option('-W', dest='prompt_password',
action='store_true', default=False, help='Prompt for a password to join
the IPA realm'), )" is assigned to nothing)
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Jan Cholasta
parent
9f49246476
commit
78254a9fdd
@@ -148,7 +148,7 @@ def parse_options():
|
||||
replica_group.add_option("-p", "--principal", dest="principal",
|
||||
default=None, help="Principal to use to log in to remote master")
|
||||
replica_group.add_option("-w", "--password", dest="password", sensitive=True,
|
||||
help="Password for the principal"),
|
||||
help="Password for the principal")
|
||||
replica_group.add_option("--ca-cert-file", dest="ca_cert_file",
|
||||
type="string", action="callback",
|
||||
callback=ca_cert_file_callback,
|
||||
|
||||
@@ -112,14 +112,15 @@ def parse_options():
|
||||
basic_group.add_option("--fixed-primary", dest="primary", action="store_true",
|
||||
default=False, help="Configure sssd to use fixed server as primary IPA server")
|
||||
basic_group.add_option("-p", "--principal", dest="principal",
|
||||
help="principal to use to join the IPA realm"),
|
||||
help="principal to use to join the IPA realm")
|
||||
basic_group.add_option("-w", "--password", dest="password", sensitive=True,
|
||||
help="password to join the IPA realm (assumes bulk password unless principal is also set)"),
|
||||
help="password to join the IPA realm (assumes bulk "
|
||||
"password unless principal is also set)")
|
||||
basic_group.add_option("-k", "--keytab", dest="keytab",
|
||||
help="path to backed up keytab from previous enrollment"),
|
||||
help="path to backed up keytab from previous enrollment")
|
||||
basic_group.add_option("-W", dest="prompt_password", action="store_true",
|
||||
default=False,
|
||||
help="Prompt for a password to join the IPA realm"),
|
||||
help="Prompt for a password to join the IPA realm")
|
||||
basic_group.add_option("--mkhomedir", dest="mkhomedir",
|
||||
action="store_true", default=False,
|
||||
help="create home directories for users on their first login")
|
||||
|
||||
@@ -218,7 +218,7 @@ class test_LDAPEntry(object):
|
||||
def test_popitem(self):
|
||||
e = self.entry
|
||||
assert e.popitem() == ('cn', self.cn1)
|
||||
list(e) == []
|
||||
assert list(e) == []
|
||||
|
||||
def test_setdefault(self):
|
||||
e = self.entry
|
||||
|
||||
@@ -125,7 +125,8 @@ class test_otptoken_import(object):
|
||||
nss.nss_init_nodb()
|
||||
try:
|
||||
doc = PSKCDocument(os.path.join(basename, "pskc-mini.xml"))
|
||||
[(t.id, t.options) for t in doc.getKeyPackages()]
|
||||
for t in doc.getKeyPackages():
|
||||
t._PSKCKeyPackage__process()
|
||||
except ValidationError: # Unsupported token type.
|
||||
pass
|
||||
else:
|
||||
|
||||
@@ -434,7 +434,7 @@ class test_automount_indirect(AutomountTest):
|
||||
"""
|
||||
Test adding a duplicate indirect map.
|
||||
"""
|
||||
api.Command['automountmap_add_indirect'](self.locname, self.mapname, **self.map_kw)['result']
|
||||
api.Command['automountmap_add_indirect'](self.locname, self.mapname, **self.map_kw)
|
||||
|
||||
def test_2_automountmap_show(self):
|
||||
"""
|
||||
|
||||
@@ -258,7 +258,6 @@ def main():
|
||||
linter.set_option('disable', 'dangerous-default-value')
|
||||
linter.set_option('disable', 'eval-used')
|
||||
linter.set_option('disable', 'exec-used')
|
||||
linter.set_option('disable', 'expression-not-assigned')
|
||||
linter.set_option('disable', 'fixme')
|
||||
linter.set_option('disable', 'global-statement')
|
||||
linter.set_option('disable', 'global-variable-not-assigned')
|
||||
|
||||
Reference in New Issue
Block a user