mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 04:54:23 +00:00
Fix the quit command
This commit is contained in:
parent
b3ee54fcdc
commit
7bdf8bffd8
@ -24,10 +24,13 @@
|
|||||||
#
|
#
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
from deluge.ui.console.main import BaseCommand
|
from deluge.ui.console.main import BaseCommand
|
||||||
|
from twisted.internet import reactor
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
"""Exit from the client."""
|
"""Exit from the client."""
|
||||||
aliases = ['exit']
|
aliases = ['exit']
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
print "Thanks!"
|
if client.connected():
|
||||||
raise StopIteration
|
def on_disconnect(result):
|
||||||
|
reactor.stop()
|
||||||
|
client.disconnect().addCallback(on_disconnect)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user