Mercurial > libervia-backend
changeset 3284:751d8fa45ced
core (launcher): fixed launching of twistd when no subparsed is specified
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 29 May 2020 20:57:23 +0200 |
parents | 7b58b15bd121 |
children | 4240b44842bb |
files | sat/core/launcher.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/core/launcher.py Tue May 26 12:52:22 2020 +0200 +++ b/sat/core/launcher.py Fri May 29 20:57:23 2020 +0200 @@ -48,6 +48,11 @@ def NOT_RUNNING_MSG(self): return f"{self.APP_NAME} is *NOT* running" + def cmd_no_subparser(self, args): + """Command launched by default""" + args.extra_args = [] + self.cmd_background(args) + def cmd_background(self, args): self.run_twistd(args) @@ -137,7 +142,7 @@ def parse_args(self): parser = argparse.ArgumentParser(description=f"Launch {self.APP_NAME} backend") - parser.set_defaults(cmd=self.cmd_background) + parser.set_defaults(cmd=self.cmd_no_subparser) subparsers = parser.add_subparsers() extra_help = f"arguments to pass to {self.APP_NAME} service"