diff options
-rw-r--r-- | python/qpid/disp.py | 4 | ||||
-rwxr-xr-x | tools/src/py/qpid-stat | 31 |
2 files changed, 20 insertions, 15 deletions
diff --git a/python/qpid/disp.py b/python/qpid/disp.py index 1b315c9d98..c29ea009de 100644 --- a/python/qpid/disp.py +++ b/python/qpid/disp.py @@ -221,7 +221,9 @@ class Sorter: list = [] for row in rows: list.append(Sortable(row, col)) - list.sort(reverse=not inc) + list.sort() + if not inc: + list.reverse() count = 0 self.sorted = [] for row in list: diff --git a/tools/src/py/qpid-stat b/tools/src/py/qpid-stat index ae5683ec54..738f0971aa 100755 --- a/tools/src/py/qpid-stat +++ b/tools/src/py/qpid-stat @@ -412,20 +412,23 @@ class BrokerManager(Console): for oid in broker.subscriptions: s = broker.subscriptions[oid] row = [] - if self.cluster: - row.append(broker.getName()) - row.append(s.name) - row.append(self.qmf.getObjects(_objectId=s.queueRef)[0].name) - connectionRef = self.qmf.getObjects(_objectId=s.sessionRef)[0].connectionRef - row.append(self.qmf.getObjects(_objectId=connectionRef)[0].address) - row.append(self.qmf.getObjects(_objectId=connectionRef)[0].remoteProcessName) - row.append(self.qmf.getObjects(_objectId=connectionRef)[0].remotePid) - row.append(s.browsing) - row.append(s.acknowledged) - row.append(s.exclusive) - row.append(s.creditMode) - row.append(s.delivered) - rows.append(row) + try: + if self.cluster: + row.append(broker.getName()) + row.append(s.name) + row.append(self.qmf.getObjects(_objectId=s.queueRef)[0].name) + connectionRef = self.qmf.getObjects(_objectId=s.sessionRef)[0].connectionRef + row.append(self.qmf.getObjects(_objectId=connectionRef)[0].address) + row.append(self.qmf.getObjects(_objectId=connectionRef)[0].remoteProcessName) + row.append(self.qmf.getObjects(_objectId=connectionRef)[0].remotePid) + row.append(s.browsing) + row.append(s.acknowledged) + row.append(s.exclusive) + row.append(s.creditMode) + row.append(s.delivered) + rows.append(row) + except: + pass title = "Subscriptions" if self.cluster: title += " for cluster '%s'" % self.cluster.clusterName |