mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 20:44:50 +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.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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user