From dc64fa3b4bbe90a37d587e49022dcc19381cdc15 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Thu, 23 Oct 2014 14:11:43 +0000 Subject: QPID-6177: qpid-tool should print warning when initial connection to broker fails git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1633818 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/tools/src/py/qpid-tool | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'qpid/tools/src') diff --git a/qpid/tools/src/py/qpid-tool b/qpid/tools/src/py/qpid-tool index 8ceaafeef8..b4c01677c3 100755 --- a/qpid/tools/src/py/qpid-tool +++ b/qpid/tools/src/py/qpid-tool @@ -29,8 +29,7 @@ from cmd import Cmd from shlex import split from threading import Lock from time import strftime, gmtime -from qpid.disp import Display -from qpid.peer import Closed +from qpidtoollibs import Display from qmf.console import Session, Console, SchemaClass, ObjectId class Mcli(Cmd): @@ -594,6 +593,12 @@ class QmfData(Console): #===================== # Methods from Console #===================== + def brokerConnectionFailed(self, broker): + """ Invoked when a connection to a broker fails """ + if self.first_connect: + self.first_connect = None + print "Failed to connect: ", broker.error + def brokerConnected(self, broker): """ Invoked when a connection is established to a broker """ try: -- cgit v1.2.1