mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +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
f083a3b67b
commit
85cdbec10d
1 changed files with 5 additions and 3 deletions
|
@ -174,9 +174,11 @@ class ConsoleUI(component.Component):
|
||||||
d = defer.succeed(None)
|
d = defer.succeed(None)
|
||||||
# If we have args, lets process them and quit
|
# If we have args, lets process them and quit
|
||||||
# allow multiple commands split by ";"
|
# allow multiple commands split by ";"
|
||||||
for arg in args.split(";"):
|
commands = [arg.strip() for arg in args.split(';')]
|
||||||
d.addCallback(do_command, arg.strip())
|
for command in commands:
|
||||||
|
d.addCallback(do_command, command)
|
||||||
|
|
||||||
|
if "quit" not in commands:
|
||||||
d.addCallback(do_command, "quit")
|
d.addCallback(do_command, "quit")
|
||||||
|
|
||||||
# We need to wait for the rpcs in start() to finish before processing
|
# We need to wait for the rpcs in start() to finish before processing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue