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:
Stanislav Levin
2021-03-30 09:58:42 +02:00
committed by Florence Blanc-Renaud
parent 056c51161c
commit 91e7452393
6 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -271,7 +271,7 @@ class server_mod(LDAPUpdate):
# server is not DNS server
pass
if 'ipalocation_location' or 'ipaserviceweight' in options:
if 'ipalocation_location' in options or 'ipaserviceweight' in options:
self.add_message(messages.ServiceRestartRequired(
service=services.service('named', api).systemd_name,
server=keys[0], ))