diff options
author | Rafael H. Schloming <rhs@apache.org> | 2007-10-14 02:21:59 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2007-10-14 02:21:59 +0000 |
commit | 9637c6b5095e9fadc895288508888c4c54c8de91 (patch) | |
tree | 6fade7cb8a21adb3d55c8d4f467941d0927d635d /python/qpid/connection.py | |
parent | 92e0c21cfbe396079abac9ae7e884d86371170bb (diff) | |
download | qpid-python-9637c6b5095e9fadc895288508888c4c54c8de91.tar.gz |
Enabled packed struct encoding in python, cpp, and java. Also fixed computation of required byte credit in Message.cpp.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@584474 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/connection.py')
-rw-r--r-- | python/qpid/connection.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/qpid/connection.py b/python/qpid/connection.py index 15d7e69945..1beb60822d 100644 --- a/python/qpid/connection.py +++ b/python/qpid/connection.py @@ -163,7 +163,10 @@ class Connection: body_size = frame_size - 12 # TODO: Magic number (frame header size) body = c.read(body_size) dec = codec.Codec(StringIO(body), self.spec) - frame = Frame.DECODERS[type].decode(self.spec, dec, len(body)) + try: + frame = Frame.DECODERS[type].decode(self.spec, dec, len(body)) + except EOF: + raise "truncated frame body: %r" % body frame.channel = channel frame.subchannel = subchannel end = c.decode_octet() @@ -350,7 +353,7 @@ class Header(Frame): props = self.properties.copy() for k in self.properties: for s in structs: - if s.has(k): + if s.exists(k): s.set(k, props.pop(k)) if props: raise TypeError("no such property: %s" % (", ".join(props))) |