summaryrefslogtreecommitdiff
path: root/python/qpid/queue.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-03-07 13:55:00 +0000
committerRafael H. Schloming <rhs@apache.org>2008-03-07 13:55:00 +0000
commit22912b1f7e82542b66f53be02ea1b8be3402e728 (patch)
tree56bf0bf58c7726fe5f4dd7e8d0adad0ac69f2e53 /python/qpid/queue.py
parent6c5dae81f69c2b5fa8fbc3dee0ac90a6bdbb76fa (diff)
downloadqpid-python-22912b1f7e82542b66f53be02ea1b8be3402e728.tar.gz
added timeouts to hello-010-world; switched to conditions rather than events for handling connection/session state; handle session exceptions
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@634678 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/queue.py')
-rw-r--r--python/qpid/queue.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/qpid/queue.py b/python/qpid/queue.py
index 00946a9156..ea8f00d091 100644
--- a/python/qpid/queue.py
+++ b/python/qpid/queue.py
@@ -35,10 +35,12 @@ class Queue(BaseQueue):
def __init__(self, *args, **kwargs):
BaseQueue.__init__(self, *args, **kwargs)
+ self.error = None
self.listener = None
self.thread = None
- def close(self):
+ def close(self, error = None):
+ self.error = error
self.put(Queue.END)
def get(self, block = True, timeout = None):
@@ -47,7 +49,7 @@ class Queue(BaseQueue):
# this guarantees that any other waiting threads or any future
# calls to get will also result in a Closed exception
self.put(Queue.END)
- raise Closed()
+ raise Closed(self.error)
else:
return result