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 | d14006009ba25fe9ed62077b942dafb8564a28c7 (patch) | |
| tree | 9e09b77a36ff2e77415d164596ec48ce913f0200 /cpp/bindings/qpid/python/python.i | |
| parent | 592e3317e4277cc469b0bdc29f4e809c1b639d07 (diff) | |
| download | qpid-python-d14006009ba25fe9ed62077b942dafb8564a28c7.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/qpid@1513537 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/python/python.i')
| -rw-r--r-- | cpp/bindings/qpid/python/python.i | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/bindings/qpid/python/python.i b/cpp/bindings/qpid/python/python.i index c10ea46000..9158836a2b 100644 --- a/cpp/bindings/qpid/python/python.i +++ b/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) |
