diff options
author | Alan Conway <aconway@apache.org> | 2014-09-04 20:44:46 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2014-09-04 20:44:46 +0000 |
commit | e11828fee8dbcda2b1b39077c89bbfe3b205943a (patch) | |
tree | 880c7a88e25066d6761397c601864b0399af811d /qpid/python | |
parent | 16a652bd02661747db2b7c6741196542a5b3b4b2 (diff) | |
download | qpid-python-e11828fee8dbcda2b1b39077c89bbfe3b205943a.tar.gz |
NO-JIRA: Fix qpid/python/qpid/messaging/driver.py to work on python 2.4.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622559 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r-- | qpid/python/qpid/messaging/driver.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qpid/python/qpid/messaging/driver.py b/qpid/python/qpid/messaging/driver.py index 4a3f0bc198..97bf1b81f2 100644 --- a/qpid/python/qpid/messaging/driver.py +++ b/qpid/python/qpid/messaging/driver.py @@ -1052,11 +1052,12 @@ class Engine: type = props.get("type", "queue") declare = props.get("x-declare", {}) + cmd = None if type == "topic": - cmd = ExchangeDeclare(exchange=name, durable=durable) if create_node else None + if create_node: cmd = ExchangeDeclare(exchange=name, durable=durable) bindings = get_bindings(props, exchange=name) elif type == "queue": - cmd = QueueDeclare(queue=name, durable=durable) if create_node else None + if create_node: cmd = QueueDeclare(queue=name, durable=durable) bindings = get_bindings(props, queue=name) else: raise ValueError(type) |