Fix #1801: ConsoleUI failed connect missing error message
This commit is contained in:
parent
ca86aa5714
commit
b81159f295
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue