diff options
| author | Alan Conway <aconway@apache.org> | 2007-03-19 19:19:53 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-03-19 19:19:53 +0000 |
| commit | 27e6ef93eea10d1aeb7ca6a6a37926aa5f85c380 (patch) | |
| tree | d213b305b08d37e5d1d1eb628cd8544070c1599a /python/qpid | |
| parent | 776c3c3a9a37b5ec4f75b40c406aabba55fd30ec (diff) | |
| download | qpid-python-27e6ef93eea10d1aeb7ca6a6a37926aa5f85c380.tar.gz | |
* python/testlib.py: -s (spec) option now also takes abbreviations "0-8" and "0-9"
to load default 0-8 or 0-9 XML respectively. Default is still 0-8.
Merged revisions 501586 via svnmerge from
https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9
........
r501586 | rhs | 2007-01-30 16:44:41 -0500 (Tue, 30 Jan 2007) | 1 line
updated python spec parse to load from multiple files, changed default specs to include errata
........
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@520051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid')
| -rw-r--r-- | python/qpid/connection.py | 3 | ||||
| -rw-r--r-- | python/qpid/peer.py | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/python/qpid/connection.py b/python/qpid/connection.py index fb1e0927f0..0785fe8774 100644 --- a/python/qpid/connection.py +++ b/python/qpid/connection.py @@ -232,6 +232,9 @@ class Response(Frame): method = Method.decode(spec, dec, size - 20) return Response(id, request_id, batch_offset, method) + def __str__(self): + return "[%s] Response(%s,%s,%s) %s" % (self.channel, self.id, self.request_id, self.batch_offset, self.method) + class Header(Frame): type = "frame_header" diff --git a/python/qpid/peer.py b/python/qpid/peer.py index 8d5029004e..b5c655dc2a 100644 --- a/python/qpid/peer.py +++ b/python/qpid/peer.py @@ -220,6 +220,8 @@ class Channel: work.put(self.incoming) elif isinstance(frame, Response): self.requester.receive(self, frame) + if frame.method_type.content: + self.queue = self.responses return self.queue.put(frame) @@ -241,7 +243,11 @@ class Channel: return None try: resp = self.responses.get() - return Message(self, resp) + if resp.method_type.content: + return Message(self, resp, read_content(self.responses)) + else: + return Message(self, resp) + except QueueClosed, e: if self.closed: raise Closed(self.reason) |
