From 664bc59231639df64f6d306eda3486e32a4d8d97 Mon Sep 17 00:00:00 2001
From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl>
Date: Sat, 28 Jan 2017 15:27:39 +0100
Subject: [PATCH] fixed #19

---
 coolamqp/clustering/cluster.py | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/coolamqp/clustering/cluster.py b/coolamqp/clustering/cluster.py
index f10116a..1af2ae9 100644
--- a/coolamqp/clustering/cluster.py
+++ b/coolamqp/clustering/cluster.py
@@ -122,15 +122,12 @@ class Cluster(object):
         if tx is not None:  # confirm is a drop-in replacement. tx is unfortunately named
             warnings.warn(u'Use confirm kwarg instead', DeprecationWarning)
 
-            if confirm is None:
-                tx = False
-            else:
+            if confirm is not None:
                 raise RuntimeError(u'Using both tx= and confirm= at once does not make sense')
-        elif confirm is None:
-            tx = False
-        else:
+        elif confirm is not None:
             tx = confirm
-
+        else:
+            tx = False
 
         try:
             return (self.pub_tr if tx else self.pub_na).publish(message, exchange, routing_key.encode('utf8'))
-- 
GitLab