diff options
| author | Gordon Sim <gsim@apache.org> | 2013-08-13 15:06:54 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-08-13 15:06:54 +0000 |
| commit | d30253ae61bb81090ba43b055094dbe5a6d7c98d (patch) | |
| tree | b63d2b8f0277a8297937e6cac6a35b9e49fc9738 /qpid/cpp/bindings | |
| parent | 144f3c698bdddf22509691a4f285305e9fd83291 (diff) | |
| download | qpid-python-d30253ae61bb81090ba43b055094dbe5a6d7c98d.tar.gz | |
QPID-4711: translate between structured content in AMQP 0-10 and 1.0
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1513537 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings')
| -rw-r--r-- | qpid/cpp/bindings/qpid/python/python.i | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qpid/cpp/bindings/qpid/python/python.i b/qpid/cpp/bindings/qpid/python/python.i index c10ea46000..9158836a2b 100644 --- a/qpid/cpp/bindings/qpid/python/python.i +++ b/qpid/cpp/bindings/qpid/python/python.i @@ -351,6 +351,9 @@ QPID_EXCEPTION(UnauthorizedAccess, SessionError) self.setProperty(k, v) def _get_content(self) : + obj = self.getContentObject() + if obj: + return obj if self.content_type == "amqp/list" : return decodeList(self) if self.content_type == "amqp/map" : @@ -365,9 +368,7 @@ QPID_EXCEPTION(UnauthorizedAccess, SessionError) elif isinstance(content, list) or isinstance(content, dict) : encode(content, self) else : - # Not a type we can handle. Try setting it anyway, - # although this will probably lead to a swig error - self.setContent(str(content)) + self.setContentObject(content) __swig_getmethods__["content"] = _get_content __swig_setmethods__["content"] = _set_content if _newclass: content = property(_get_content, _set_content) |
