diff options
author | Ted Ross <tross@apache.org> | 2008-12-03 18:43:16 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2008-12-03 18:43:16 +0000 |
commit | ba8e5b1129ebb83a601574f349db9701b1511809 (patch) | |
tree | 3ed738d603a5c3ac246cdb2b434763d5375e0994 /python/qmf/console.py | |
parent | 46cd611c333e71ef4297b47bfa67ed09343191b1 (diff) | |
download | qpid-python-ba8e5b1129ebb83a601574f349db9701b1511809.tar.gz |
QPID-1512 - Catch only connection-related exceptions in qmf console
connection thread
- Added __hash__ method for UUID in qpid.datatypes
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@723008 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qmf/console.py')
-rw-r--r-- | python/qmf/console.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/python/qmf/console.py b/python/qmf/console.py index fe329db289..739ccb6b6b 100644 --- a/python/qmf/console.py +++ b/python/qmf/console.py @@ -1191,9 +1191,16 @@ class ManagedConnection(Thread): delay = self.DELAY_MIN finally: self.cv.release() - except: + except socket.error: + if delay < self.DELAY_MAX: + delay *= self.DELAY_FACTOR + except SessionDetached: if delay < self.DELAY_MAX: delay *= self.DELAY_FACTOR + except Closed: + if delay < self.DELAY_MAX: + delay *= self.DELAY_FACTOR + try: self.cv.acquire() self.cv.wait(delay) @@ -1332,13 +1339,13 @@ class Broker: except socket.error, e: self.error = "Socket Error %s - %s" % (e[0], e[1]) - raise Exception(self.error) + raise except Closed, e: self.error = "Connect Failed %d - %s" % (e[0], e[1]) - raise Exception(self.error) + raise except ConnectionFailed, e: self.error = "Connect Failed %d - %s" % (e[0], e[1]) - raise Exception(self.error) + raise def _updateAgent(self, obj): bankKey = (obj.brokerBank, obj.agentBank) |