mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
pylint: Fix several warnings
Fixes Pylint warnings: - R1729(use-a-generator) - R1710(inconsistent-return-statements) - R1727(condition-evals-to-constant) Fixes: https://pagure.io/freeipa/issue/8772 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
committed by
Florence Blanc-Renaud
parent
056c51161c
commit
91e7452393
@@ -869,12 +869,12 @@ def ensure_last_services(conn, hostname, masters, options):
|
||||
if ca_hostname is None and 'CA' in services_cns:
|
||||
ca_hostname = master_cn
|
||||
|
||||
if 'CA' in this_services and not any(['CA' in o for o in other_services]):
|
||||
if 'CA' in this_services and not any('CA' in o for o in other_services):
|
||||
print("Deleting this server is not allowed as it would leave your installation without a CA.")
|
||||
sys.exit(1)
|
||||
|
||||
other_dns = True
|
||||
if 'DNS' in this_services and not any(['DNS' in o for o in other_services]):
|
||||
if 'DNS' in this_services and not any('DNS' in o for o in other_services):
|
||||
other_dns = False
|
||||
print("Deleting this server will leave your installation without a DNS.")
|
||||
if not options.force and not ipautil.user_input("Continue to delete?", False):
|
||||
|
||||
Reference in New Issue
Block a user