diff --git a/ChangeLog b/ChangeLog index ce5c5c3b2..8a7f77d89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py index 3a850d8d9..91b29c463 100644 --- a/deluge/ui/console/main.py +++ b/deluge/ui/console/main.py @@ -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: