Fix #1052 crash when issuing commands while not connected to a daemon
This commit is contained in:
parent
a110ad1d20
commit
7c10dd4c0e
|
@ -275,6 +275,10 @@ class ConsoleUI(component.Component):
|
|||
parser._print_help(f)
|
||||
parser.print_help = print_help
|
||||
|
||||
if not client.connected() and cmd not in ("connect", "quit"):
|
||||
self.write("{!error!}Not connected to a daemon, please use the connect command first.")
|
||||
return
|
||||
|
||||
try:
|
||||
options, args = parser.parse_args(args)
|
||||
except Exception, e:
|
||||
|
|
Loading…
Reference in New Issue