Revert "Optimise the code style"
This reverts commit a8f776cc77
.
Change-Id: I75082a71fe1ab1dd2a1fce94ef12d472c32c5263
Closes-Bug: #1749919
This commit is contained in:
parent
8088ecada5
commit
5d0151c405
|
@ -245,15 +245,16 @@ def main():
|
|||
else:
|
||||
daemon = linux_daemon.Daemon(daemonizable=freezer_scheduler)
|
||||
|
||||
_ACTION = {
|
||||
'start': daemon.start,
|
||||
'stop': daemon.stop,
|
||||
'restart': daemon.restart,
|
||||
'reload': daemon.reload,
|
||||
'status': daemon.status
|
||||
}
|
||||
|
||||
_ACTION.get(CONF.action)()
|
||||
if CONF.action == 'start':
|
||||
daemon.start()
|
||||
elif CONF.action == 'stop':
|
||||
daemon.stop()
|
||||
elif CONF.action == 'restart':
|
||||
daemon.restart()
|
||||
elif CONF.action == 'reload':
|
||||
daemon.reload()
|
||||
elif CONF.action == 'status':
|
||||
daemon.status()
|
||||
|
||||
# os.RETURN_CODES are only available to posix like systems, on windows
|
||||
# we need to translate the code to an actual number which is the equivalent
|
||||
|
|
Loading…
Reference in New Issue