mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Fix #1801: ConsoleUI failed connect results in unhandled defered error and missing error message
This commit is contained in:
parent
f59eca4405
commit
2e7bd90bda
2 changed files with 8 additions and 1 deletions
|
@ -59,7 +59,11 @@ class Command(BaseCommand):
|
|||
component.start()
|
||||
|
||||
def on_connect_fail(result):
|
||||
self.console.write("{!error!}Failed to connect to %s:%s with reason: %s" % (host, port, result.value.args[0]))
|
||||
try:
|
||||
msg = result.value.exception_msg
|
||||
except:
|
||||
msg = result.value.args[0]
|
||||
self.console.write("{!error!}Failed to connect to %s:%s with reason: %s" % (host, port, msg))
|
||||
|
||||
d.addCallback(on_connect)
|
||||
d.addErrback(on_connect_fail)
|
||||
|
|
|
@ -184,8 +184,11 @@ class ConsoleUI(component.Component):
|
|||
self.started_deferred.addCallback(on_started)
|
||||
component.start().addCallback(on_started)
|
||||
|
||||
def on_connect_fail(result):
|
||||
pass
|
||||
d = client.connect()
|
||||
d.addCallback(on_connect)
|
||||
d.addErrback(on_connect_fail)
|
||||
|
||||
self.coreconfig = CoreConfig()
|
||||
if self.interactive and not deluge.common.windows_check():
|
||||
|
|
Loading…
Add table
Reference in a new issue