mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 04:24:27 +00:00
Only add quit to deluge-console args if it isn't already present
This prevents an error from being raised due to trying to stop a reactor which is no longer running
This commit is contained in:
parent
88dd64e795
commit
e1b09f2694
@ -119,9 +119,11 @@ class Commander:
|
||||
d = defer.succeed(None)
|
||||
# If we have args, lets process them and quit
|
||||
# allow multiple commands split by ";"
|
||||
for arg in args.split(";"):
|
||||
d.addCallback(do_command, arg.strip())
|
||||
commands = [arg.strip() for arg in args.split(';')]
|
||||
for command in commands:
|
||||
d.addCallback(do_command, command)
|
||||
|
||||
if "quit" not in commands and "exit" not in commands:
|
||||
d.addCallback(do_command, "quit")
|
||||
|
||||
# We need to wait for the rpcs in start() to finish before processing
|
||||
|
Loading…
x
Reference in New Issue
Block a user