core (launcher): fixed launching of twistd when no subparsed is specified
This commit is contained in:
parent
0707e639b1
commit
f48ad8179c
1 changed files with 6 additions and 1 deletions
|
|
@ -48,6 +48,11 @@ class Launcher:
|
|||
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 @@ class Launcher:
|
|||
|
||||
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"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue