better message when server is not running

when a client is started and the server is not running,
issue 'please use ".. start .."' message
This commit is contained in:
2021-04-09 10:15:32 +02:00
parent 9900af0e3f
commit 3748948b5d
3 changed files with 9 additions and 6 deletions

View File

@ -63,8 +63,8 @@ def run(group, arglist):
return
action = arglist.pop(0) if hasattr(serv, 'do_' + arglist[0]) else 'gui'
instance = arglist.pop(0) if arglist[0] and arglist[0] not in serv.services else None
if instance is None and len(serv.info) == 1:
instance = list(serv.info)[0]
if instance is None and serv.main_ins:
instance = serv.main_ins
if instance is not None:
arglist.insert(0, instance)
arglist.pop() # remove dummy argument