mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
pylint: remove useless suppression
The newer version of pylint has fixed false positives and does not need anymore these suppressions: - global-variable-not-assigned - invalid-sequence-index - no-name-in-module - not-callable - unsupported-assignment-operation Related: https://pagure.io/freeipa/issue/9278 Signed-off-by: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Stanislav Levin <slev@altlinux.org>
This commit is contained in:
@@ -132,7 +132,6 @@ def main():
|
||||
print("Enabling plugin")
|
||||
|
||||
# https://github.com/PyCQA/pylint/issues/872
|
||||
# pylint: disable=unsupported-assignment-operation
|
||||
if entry is None:
|
||||
ld = LDAPUpdate()
|
||||
if not ld.update(files):
|
||||
@@ -141,7 +140,6 @@ def main():
|
||||
else:
|
||||
entry['nsslapd-pluginenabled'] = ['on']
|
||||
api.Backend.ldap2.update_entry(entry)
|
||||
# pylint: enable=unsupported-assignment-operation
|
||||
except errors.ExecutionError as lde:
|
||||
print("An error occurred while talking to the server.")
|
||||
print(lde)
|
||||
@@ -171,9 +169,7 @@ def main():
|
||||
else:
|
||||
print("Disabling plugin")
|
||||
|
||||
# pylint: disable=unsupported-assignment-operation
|
||||
entry['nsslapd-pluginenabled'] = ['off']
|
||||
# pylint: enable=unsupported-assignment-operation
|
||||
api.Backend.ldap2.update_entry(entry)
|
||||
except errors.DatabaseError as dbe:
|
||||
print("An error occurred while talking to the server.")
|
||||
|
||||
@@ -155,9 +155,7 @@ def main():
|
||||
elif entry.get('nsslapd-pluginenabled', [''])[0].lower() == 'off':
|
||||
print("Enabling plugin")
|
||||
# Already configured, just enable the plugin
|
||||
# pylint: disable=unsupported-assignment-operation
|
||||
entry['nsslapd-pluginenabled'] = ['on']
|
||||
# pylint: enable=unsupported-assignment-operation
|
||||
api.Backend.ldap2.update_entry(entry)
|
||||
else:
|
||||
print("Plugin already Enabled")
|
||||
|
||||
Reference in New Issue
Block a user