Fix #1052 crash when issuing commands while not connected to a daemon
This commit is contained in:
parent
d110b23a9f
commit
60fdcb3bd8
@ -19,7 +19,8 @@
|
||||
|
||||
==== Console ====
|
||||
* Fix displaying non-ascii strings
|
||||
|
||||
* Fix #1052 crash when issuing commands while not connected to a daemon
|
||||
|
||||
=== Deluge 1.2.0_rc2 (25 October 2009) ===
|
||||
==== GtkUI ====
|
||||
* Fix path errors when adding torrents externally in Windows
|
||||
|
||||
@ -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