mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-17 13:56:47 +00:00
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…
x
Reference in New Issue
Block a user