Merge pull request #1138 from bcoca/service_fix
simplified bad if chain
This commit is contained in:
commit
727c9131c8
1 changed files with 3 additions and 7 deletions
|
@ -703,14 +703,10 @@ class LinuxService(Service):
|
||||||
|
|
||||||
# Check if we're already in the correct state
|
# Check if we're already in the correct state
|
||||||
service_enabled = self.get_systemd_service_enabled()
|
service_enabled = self.get_systemd_service_enabled()
|
||||||
if self.enable and service_enabled:
|
|
||||||
self.changed = False
|
|
||||||
elif not self.enable and not service_enabled:
|
|
||||||
self.changed = False
|
|
||||||
elif not self.enable:
|
|
||||||
self.changed = False
|
|
||||||
|
|
||||||
if not self.changed:
|
# self.changed should already be true
|
||||||
|
if self.enable == service_enabled:
|
||||||
|
self.changed = False
|
||||||
return
|
return
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue