allow client daemon to be launched in the foreground (fix #1873)
This commit is contained in:
@@ -762,7 +762,7 @@ def get_parser():
|
||||
add_network_options(parser_gui)
|
||||
# daemon
|
||||
parser_daemon = subparsers.add_parser('daemon', parents=[parent_parser], help="Run Daemon")
|
||||
parser_daemon.add_argument("subcommand", choices=['start', 'status', 'stop'])
|
||||
parser_daemon.add_argument("subcommand", choices=['start', 'status', 'stop'], nargs='?')
|
||||
#parser_daemon.set_defaults(func=run_daemon)
|
||||
add_network_options(parser_daemon)
|
||||
# commands
|
||||
|
||||
@@ -147,8 +147,8 @@ class Daemon(DaemonThread):
|
||||
|
||||
def run_daemon(self, config):
|
||||
sub = config.get('subcommand')
|
||||
assert sub in ['start', 'stop', 'status']
|
||||
if sub == 'start':
|
||||
assert sub in [None, 'start', 'stop', 'status']
|
||||
if sub in [None, 'start']:
|
||||
response = "Daemon already running"
|
||||
elif sub == 'status':
|
||||
if self.network:
|
||||
|
||||
Reference in New Issue
Block a user