Author: andar
Revision: 5896
Log:
Fix #1052 crash when issuing commands while not connected to a daemon
Diff:
Modified: branches/1.2_RC/ChangeLog
===================================================================
--- branches/1.2_RC/ChangeLog 2009-10-30 19:08:23 UTC (rev 5895)
+++ branches/1.2_RC/ChangeLog 2009-10-30 20:06:07 UTC (rev 5896)
@@ -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
Modified: branches/1.2_RC/deluge/ui/console/main.py
===================================================================
--- branches/1.2_RC/deluge/ui/console/main.py 2009-10-30 19:08:23 UTC (rev
5895)
+++ branches/1.2_RC/deluge/ui/console/main.py 2009-10-30 20:06:07 UTC (rev
5896)
@@ -275,6 +275,10 @@
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:
Modified: trunk/deluge/ui/console/main.py
===================================================================
--- trunk/deluge/ui/console/main.py 2009-10-30 19:08:23 UTC (rev 5895)
+++ trunk/deluge/ui/console/main.py 2009-10-30 20:06:07 UTC (rev 5896)
@@ -275,6 +275,10 @@
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:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---