Fix #1801: ConsoleUI failed connect missing error message

This commit is contained in:
Calum Lind 2011-07-09 00:56:48 +01:00
parent ca86aa5714
commit b81159f295
1 changed files with 5 additions and 1 deletions

View File

@ -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)