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:
Jan Barta
2016-06-02 09:58:52 +02:00
committed by Martin Basti
parent 929086e099
commit 36484e8672
9 changed files with 15 additions and 55 deletions

View File

@@ -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))