You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2014/07/08 22:31:18 UTC
svn commit: r1608949 - in /qpid/dispatch/trunk:
python/qpid_dispatch_internal/management/node.py tools/qdstat
Author: aconway
Date: Tue Jul 8 20:31:17 2014
New Revision: 1608949
URL: http://svn.apache.org/r1608949
Log:
NO-JIRA: Error handling in qdstat, don't try to stop BusManager if it never started
Modified:
qpid/dispatch/trunk/python/qpid_dispatch_internal/management/node.py
qpid/dispatch/trunk/tools/qdstat
Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/management/node.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/management/node.py?rev=1608949&r1=1608948&r2=1608949&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/management/node.py (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/management/node.py Tue Jul 8 20:31:17 2014
@@ -77,7 +77,7 @@ class Url:
else:
match = Url.RE.match(s)
if match is None:
- raise ValueError(s)
+ raise ValueError("Invalid AMQP URL: %s"%s)
scheme, self.user, self.password, host4, host6, port, self.path = match.groups()
self.host = host4 or host6
self.port = port and int(port)
@@ -218,7 +218,7 @@ class Node(object):
def call(self, request):
"""
Send a management request message, wait for a response.
- @return: Response message
+ @return: Response message.
"""
if not request.address:
raise ValueError("Message must have an address")
Modified: qpid/dispatch/trunk/tools/qdstat
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tools/qdstat?rev=1608949&r1=1608948&r2=1608949&view=diff
==============================================================================
--- qpid/dispatch/trunk/tools/qdstat (original)
+++ qpid/dispatch/trunk/tools/qdstat Tue Jul 8 20:31:17 2014
@@ -336,8 +336,10 @@ def main(argv=None):
args = OptionsAndArguments(argv)
try:
bm = BusManager(config._address, config._router)
- bm.display(args)
- bm.stop()
+ try:
+ bm.display(args)
+ finally:
+ bm.stop()
return 0
except KeyboardInterrupt:
print
@@ -349,7 +351,6 @@ def main(argv=None):
except Exception,e:
print "Failed: %s - %s" % (e.__class__.__name__, e)
- bm.stop()
return 1
if __name__ == "__main__":
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org