mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
pylint: fix simplifiable-if-statement warnings
fix inefficient if statements, enable pylint check Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
@@ -271,10 +271,8 @@ class SystemdService(PlatformService):
|
||||
|
||||
ipautil.run(args, skip_output=not capture_output)
|
||||
|
||||
if getattr(self.api.env, 'context', None) in ['ipactl', 'installer']:
|
||||
update_service_list = True
|
||||
else:
|
||||
update_service_list = False
|
||||
update_service_list = getattr(self.api.env, 'context',
|
||||
None) in ['ipactl', 'installer']
|
||||
super(SystemdService, self).stop(
|
||||
instance_name,
|
||||
update_service_list=update_service_list)
|
||||
@@ -284,10 +282,8 @@ class SystemdService(PlatformService):
|
||||
self.service_instance(instance_name)],
|
||||
skip_output=not capture_output)
|
||||
|
||||
if getattr(self.api.env, 'context', None) in ['ipactl', 'installer']:
|
||||
update_service_list = True
|
||||
else:
|
||||
update_service_list = False
|
||||
update_service_list = getattr(self.api.env, 'context',
|
||||
None) in ['ipactl', 'installer']
|
||||
|
||||
if wait and self.is_running(instance_name):
|
||||
self.wait_for_open_ports(self.service_instance(instance_name))
|
||||
|
||||
Reference in New Issue
Block a user