Author: andar

Revision: 5099

Log:
        Fix the quit command

Diff:
Modified: trunk/deluge/ui/console/commands/quit.py
===================================================================
--- trunk/deluge/ui/console/commands/quit.py    2009-04-20 02:28:06 UTC (rev 
5098)
+++ trunk/deluge/ui/console/commands/quit.py    2009-04-20 03:51:15 UTC (rev 
5099)
@@ -24,10 +24,13 @@
 #
 from deluge.ui.client import client
 from deluge.ui.console.main import BaseCommand
+from twisted.internet import reactor
 
 class Command(BaseCommand):
     """Exit from the client."""
     aliases = ['exit']
     def handle(self, *args, **options):
-        print "Thanks!"
-        raise StopIteration
+        if client.connected():
+            def on_disconnect(result):
+                reactor.stop()
+            client.disconnect().addCallback(on_disconnect)



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

Reply via email to