summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/stageuser.py
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-10-04 20:02:32 +0200
committerMartin Basti <mbasti@redhat.com>2016-10-06 10:43:36 +0200
commit135047d03c1780d682998369aaa531585b39a069 (patch)
tree13dfe4637a7f264bcc911b7bc1f36a8662ee1762 /ipaserver/plugins/stageuser.py
parentd9375881460d63cdd696bb0705da0ac205db9870 (diff)
downloadfreeipa-135047d03c1780d682998369aaa531585b39a069.tar.gz
freeipa-135047d03c1780d682998369aaa531585b39a069.tar.xz
freeipa-135047d03c1780d682998369aaa531585b39a069.zip
Pylint: remove unused variables in ipaserver package
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaserver/plugins/stageuser.py')
-rw-r--r--ipaserver/plugins/stageuser.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/ipaserver/plugins/stageuser.py b/ipaserver/plugins/stageuser.py
index 5fbd313a9..1da43ecb6 100644
--- a/ipaserver/plugins/stageuser.py
+++ b/ipaserver/plugins/stageuser.py
@@ -50,8 +50,6 @@ from ipaplatform.paths import paths
from ipapython.ipautil import ipa_generate_password, GEN_TMP_PWD_LEN
from ipalib.capabilities import client_has_capability
-# pylint: disable=unused-variable
-
if six.PY3:
unicode = str
@@ -385,7 +383,6 @@ class stageuser_add(baseuser_add):
def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
assert isinstance(dn, DN)
- config = ldap.get_ipa_config()
# Fetch the entry again to update memberof, mep data, etc updated
# at the end of the transaction.
@@ -639,7 +636,9 @@ class stageuser_activate(LDAPQuery):
# Check that this value is a Active user
try:
- entry_attrs = self._exc_wrapper(args, options, ldap.get_entry)(value, ['dn'])
+ self._exc_wrapper(args, options, ldap.get_entry)(
+ value, ['dn']
+ )
return value
except errors.NotFound:
return u''
@@ -667,10 +666,9 @@ class stageuser_activate(LDAPQuery):
# Check it does not exist an active entry with the same RDN
active_dn = DN(staging_dn[0], api.env.container_user, api.env.basedn)
try:
- test_entry_attrs = self._exc_wrapper(args, options, ldap.get_entry)(
+ self._exc_wrapper(args, options, ldap.get_entry)(
active_dn, ['dn']
)
- assert isinstance(staging_dn, DN)
raise errors.DuplicateEntry(
message=_('active user with name "%(user)s" already exists') %
dict(user=args[-1]))