From 3add7d150984e7904acf0898cab8cb7941de27ba Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Wed, 17 Feb 2010 20:21:10 +0000 Subject: fixed subject defaulting and added test git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@911166 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/driver.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'python/qpid/driver.py') diff --git a/python/qpid/driver.py b/python/qpid/driver.py index 3b9d7aa9fa..ed6fbc3b6a 100644 --- a/python/qpid/driver.py +++ b/python/qpid/driver.py @@ -950,6 +950,12 @@ class Driver: rk = _snd._routing_key else: rk = msg.subject + + if msg.subject is None: + subject = _snd.subject + else: + subject = msg.subject + # XXX: do we need to query to figure out how to create the reply-to interoperably? if msg.reply_to: rt = addr2reply_to(msg.reply_to) @@ -962,10 +968,10 @@ class Driver: correlation_id=msg.correlation_id, content_type=msg.content_type, application_headers=msg.properties) - if msg.subject is not None: + if subject is not None: if mp.application_headers is None: mp.application_headers = {} - mp.application_headers[SUBJECT] = msg.subject + mp.application_headers[SUBJECT] = subject if msg.to is not None: if mp.application_headers is None: mp.application_headers = {} -- cgit v1.2.1