Fix #1052 crash when issuing commands while not connected to a daemon

This commit is contained in:
Andrew Resch 2009-10-30 20:06:07 +00:00
parent d110b23a9f
commit 60fdcb3bd8
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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: