From 4072ab6f9e4d5eafb3ffa25cb8538dedde8360de Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Fri, 26 Jun 2009 12:57:43 +0000 Subject: Added --timeout options to cli tools. Cli tools will not hang indefinitely if the broker is non-responsive. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@788681 13f79535-47bb-0310-9956-ffa450edef68 --- python/commands/qpid-tool | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python/commands/qpid-tool') diff --git a/python/commands/qpid-tool b/python/commands/qpid-tool index 14308f69fb..05afcc9732 100755 --- a/python/commands/qpid-tool +++ b/python/commands/qpid-tool @@ -24,7 +24,7 @@ import getopt import sys import socket from cmd import Cmd -from qpid.connection import ConnectionFailed +from qpid.connection import ConnectionFailed, Timeout from qpid.managementdata import ManagementData from shlex import split from qpid.disp import Display @@ -183,6 +183,8 @@ except ConnectionFailed, e: except Exception, e: if str(e).find ("Exchange not found") != -1: print "Management not enabled on broker: Use '-m yes' option on broker startup." + else: + print "Failed: %s - %s" % (e.__class__.__name__, e) sys.exit(1) # Instantiate the CLI interpreter and launch it. -- cgit v1.2.1