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 ====
|
==== Console ====
|
||||||
* Fix displaying non-ascii strings
|
* 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) ===
|
=== Deluge 1.2.0_rc2 (25 October 2009) ===
|
||||||
==== GtkUI ====
|
==== GtkUI ====
|
||||||
* Fix path errors when adding torrents externally in Windows
|
* Fix path errors when adding torrents externally in Windows
|
||||||
|
|||||||
@ -275,6 +275,10 @@ class ConsoleUI(component.Component):
|
|||||||
parser._print_help(f)
|
parser._print_help(f)
|
||||||
parser.print_help = print_help
|
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:
|
try:
|
||||||
options, args = parser.parse_args(args)
|
options, args = parser.parse_args(args)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user